COMPAT: ensure no warnings on tab completion with Jedi 0.15
State: closed

Closes https://github.com/pandas-dev/pandas/issues/27900

I didn't yet add any tests, because I am not fully sure how to write them (the IPython tests we already have clearly don't work, I suppose the programmatic `ip.Completer.completions(..)` doesn't go through jedi)



Labels:
name: Output-Formatting
description: __repr__ of pandas objects, to_string

Comments:
What do we need to back port this for? Thought we were only back porting `0.25.X` regressions but this has been around since `0.20.X`?
https://github.com/pandas-dev/pandas/issues/27900 is a new issue (due to a recent release of Jedi). The issue that I reference there is several releases old, but that was actually also fixed back then.
Yea I guess I just fail to see the point of back porting. I thought we wanted to be conservative and only do regressions. 

Is it just a warning or is it actually going to break soon, hence the request for back port?
I don't know if you are using tab completion in an ipython console with latest versions of IPython and Jedi, but IMO this is *usability* regression. Getting a flood of warnings each time you press TAB is quite annoying.
To be clear, you are certainly right that this is not a regression in the sense that something actually broke. And it depends a bit on your habits if you do tab completion without already starting to type (it only happens if you do `s.<TAB>`, not `s.me<TAB>`). But if you do this regularly to show all possible attributes and methods, the flood of warnings is annoying. And given that is a fairly small / innocent change otherwise, I have a preference to backport this.
I tried on IPython 7.8.0 with jedi 0.15.1 on macOS with Python 3.7 and didn't get any warnings. Mistake on my end?

<img width="940" alt="image" src="https://user-images.githubusercontent.com/609873/65262480-4b648b80-dabf-11e9-90f0-fc4b3a54a39a.png">

Hmm also no issue doing `pd.DataFrame().` + TAB which might be more applicable
Nevermind looks like I can reproduce with the code you have in #1383

In any case I'd still rather not back port as I don't think it's that critical but will leave to majority
I think this is important enough to backport.
thanks @jorisvandenbossche 

I suppose we should have a test that we don't show any Deprecationwarnings (on tests) though thought we did
Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

1. Checkout backport branch and update it.

```
$ git checkout 0.25.x
$ git pull
```

2. Cherry pick the first parent branch of the this PR on top of the older branch:
```
$ git cherry-pick -m1 cc4172d289c661990f766b578596127bc51cb8be
```

3. You will likely have some merge/cherry-pick conflict here, fix them and commit:

```
$ git commit -am 'Backport PR #28524: COMPAT: ensure no warnings on tab completion with Jedi 0.15'
```

4. Push to a named branch :

```
git push YOURFORK 0.25.x:auto-backport-of-pr-28524-on-0.25.x
```

5. Create a PR against branch 0.25.x, I would have named this PR:

> "Backport PR #28524 on branch 0.25.x"

And apply the correct labels and milestones.

Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon!

If these instruction are inaccurate, feel free to [suggest an improvement](https://github.com/MeeseeksBox/MeeseeksDev).
                
@jorisvandenbossche can you do the manual backport?
Yep will do

> I suppose we should have a test that we don't show any Deprecationwarnings (on tests) though thought we did

Yes, we do have a test for that using IPython. But the programmatic way to do that does not match exactly the interactive console behaviour (it does not use Jedi), so we would need to write a specific test using Jedi.