-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Reintegrate jedi #10182
Reintegrate jedi #10182
Conversation
f9b6304
to
a223bd9
Compare
First step in reintegrating Jedi If Jedi is installed expose a private API use it with prompt toolkit. Next step would to tag completions we don't expect Jedi to have and not Jedi completion and this behavior are enabled by default, but could Here you can see that jedi does not propose |
291d339
to
615842d
Compare
@takluyver I have a feeling you'll have opinions on this one. As a first pass to ward jedi integration and high level views. Thoughs ? |
hmm. Jedi. You mentioned to ask how can we help. Anything I can do? : ) |
Sure ! How comfortable are you with Python ? Right now I need to know if:
Other things that should be worked on: assuming you do The current API return The old API is also relatively not well documented so understanding (and documenting) would be great. Lastly there are a number of issues tagged In a first iteration if you already managed to get that to work on your machine, and test to find bugs, that would be super-helpful ! Also I'm testing with Jedi-dev, I need to make sure it also work with Jedi stable ! Here is a high level view, if you have any more detailed questions feel free to ask ! |
I can try bug testing and reading the code. Thanks. |
d326c47
to
57f71f1
Compare
Ok, I think this is ready-ish for review, with tests, docs. I rebased/squashed everything and here is the commit message for the current commit: First step in reintegrating Jedi If Jedi is installed expose a private API use it with prompt toolkit. Jedi completion and this behavior are enabled by default, but could Add also a number of debug flags to be able to track why jedi is not Once That would just be too much for an already BIG pull-request. @willingc I did a pass on documenting thing better, I would appreciate hints on where to do things better. |
There is a duplication issue of |
Ok, that's an edge case and not a bug. One completer returns |
If Jedi is installed expose a private API use it with prompt toolkit. Jedi does not _yet_ provide all the completion IPython has, so this is still a bit awkward. In order to debug this (and see what is Jedi provided we for now inject a fake Jedi/IPython delimiter in the menu. Jedi completion and this behavior are enabled by default, but could likely be opt-in. Add also a number of debug flags to be able to track why jedi is not working, and/or what completions are found by IPython and not Jedi. That should give us a bit of heads up and feedback to know whether we can remove part of the IPython completer, and more especially if we can drop `python_matches`. Once `python_matches` is dropped and some other of the current matchers are either dropped or converted to the new API, that should simplify the internal quite a bit. That would just be too much for an already BIG pull-request.
d5cf9e6
to
39c6549
Compare
Rebased. |
Signing up for these completion threads -- is there a good way for me to run the changes you have for ipykernel and ipython together? Check out the branches for both of these into a virtual environment and set them up as a kernel? |
I hope someone to merge that soonish, I'll update my ipykernel branch then. Yes checking the branches in an env would work. The ipykernel one does not sed his extra info in metadata, but that should "just" take me 30 min to do |
Because I saw in another thread that you're frustrated by the wait for review: this is on my queue to look at, but it falls into the same trap I told Mike about. Things that I know I want longer to look at tend to get pushed down the queue, because bashing through the easy issues is more effective in keeping down the number waiting for attention. |
Thanks, I appreciate, and I understand. I've tried to push your PR and notebook 5.0 issues as well to give you some review time. |
I've had a brief scan through this; it looks OK. As before, I think the main thing is to land it in master and start trying it out. The |
Let's see what happens :-) |
Thank you ! |
Not requesting review, just committing before going home, and indicating that I'm starting to work on that (help welcomed, feel free to push on the branch).
This try to integrate the Jedi (0.9+) completion machinery into IPython (prompt toolkit interface only for now, cause PTK is the best)
Right now this is (and will be) mostly through private API which will return jedi completion alongside IPython completions that will help me to set up a debugging that compare both and pop-up a warning if IPython found a completion that jedi missed.
For the little testing I did this fill fix/implement many of our
tab-completion
labeled issues.