Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COMPAT: ensure no warnings on tab completion with Jedi 0.15 #28524

Merged

Conversation

jorisvandenbossche
Copy link
Member

Closes #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)

@jorisvandenbossche jorisvandenbossche added this to the 0.25.2 milestone Sep 19, 2019
Copy link
Contributor

@TomAugspurger TomAugspurger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it out locally. Still a bit slow the first time, but no warnings.

Agreed with backporting.

@WillAyd
Copy link
Member

WillAyd commented Sep 19, 2019

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?

@jorisvandenbossche
Copy link
Member Author

#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.

@WillAyd
Copy link
Member

WillAyd commented Sep 19, 2019

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?

@jorisvandenbossche
Copy link
Member Author

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.

@jorisvandenbossche
Copy link
Member Author

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.

@WillAyd
Copy link
Member

WillAyd commented Sep 19, 2019

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?

image

@WillAyd
Copy link
Member

WillAyd commented Sep 19, 2019

Hmm also no issue doing pd.DataFrame(). + TAB which might be more applicable

@WillAyd
Copy link
Member

WillAyd commented Sep 19, 2019

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

@TomAugspurger
Copy link
Contributor

I think this is important enough to backport.

@jreback jreback added the Output-Formatting __repr__ of pandas objects, to_string label Sep 20, 2019
@jreback jreback merged commit cc4172d into pandas-dev:master Sep 20, 2019
@jreback
Copy link
Contributor

jreback commented Sep 20, 2019

thanks @jorisvandenbossche

I suppose we should have a test that we don't show any Deprecationwarnings (on tests) though thought we did

@lumberbot-app
Copy link

lumberbot-app bot commented Sep 20, 2019

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
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
$ git cherry-pick -m1 cc4172d289c661990f766b578596127bc51cb8be
  1. 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'
  1. Push to a named branch :
git push YOURFORK 0.25.x:auto-backport-of-pr-28524-on-0.25.x
  1. 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.

@TomAugspurger
Copy link
Contributor

@jorisvandenbossche can you do the manual backport?

@jorisvandenbossche jorisvandenbossche deleted the jedi-tab-completion-warnings branch September 20, 2019 15:45
@jorisvandenbossche
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Output-Formatting __repr__ of pandas objects, to_string
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tab completion triggers deprecation warnings with latest Jedi (0.15.1)
4 participants