-
Notifications
You must be signed in to change notification settings - Fork 283
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
Update Jedi calls for its 0.17.0+ API #781
Conversation
Signed-off-by: Morten Linderud <morten@linderud.pw>
fix path and project parameters for jedi_script remove deprecated usages() calls
source is deprecated in 0.17.0 in favor of code but code did not exist in 0.16.0
sometimes jedi reports some keywords first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bnavigator, as part of this PR please also remove the code that tried to support Jedi 0.14 because it no longer applies (please look for JEDI_VERSION to do do that).
Thanks a lot @bnavigator for your help with this one! I'll review it tomorrow (I don't have time today, sorry). |
Thanks a lot for this @bnavigator!! |
IS this ready @ccordoba12 ? |
Is there any update on this or is there any way to help finalizing this pull request? |
I haven't had time to review it. Please help me with that and let me know if you need additional help. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes seem good to me. The changes from davidhalter/jedi#1063 (comment) are accounted for and the new Project
feature of jedi 0.17 is used.
I will now test this branch with vim + asyncomplete + vim-lsp for definition, hover, completion, references and signature. As far as I know, highlights are not implemented for this client, yet.
I have tested all mentioned features in a relatively simple script that imports various modules from Keras, NumPy, SciPy, Argparse and others and pyls worked flawlessly. @ccordoba12 If more comprehensive testing or more detailed commentary on the changes are needed, please tell me in detail what you need.. |
Thanks for the review @E1k3
@ccordoba12 Is there anything to be done with this request despite merging it? The archlinux package of pyls is currently incompatible with jedi and workarounds are on hold, because this looks finished. |
@E1k3, I recommend you apply the patch directly to the Archlinux package. That's what OpenSUSE is doing. There may be some burnt ground between @ccordoba12 and me. Chances are, he will never accept this PR despite the clear demand from the community shown by the reactions in this thread and in #744. |
@bnavigator we really appreciate your help with this work. We are a bit crowded right now and in the midst of making a release. Having this PR merged could delay our release or introduce some unwanted bugs with some other libraries introspection.
We just need to review the PR (I have not found time yet!) We also probably need to add some simple smoke tests with libraries that have broken with the past versions of Jedi (0.16). Thanks again for the help! |
This is not true. As @goanpeca said, we are swamped at the moment and haven't had time to review this PR, sorry. We'll try to do it and release 0.32.0 with these changes this week. |
I already added tests for Numpy, Pandas and Matplotlib. One of them detected an error in Jedi 0.16, which was fixed in 0.17 |
Using _workspace.root_path didn't look like such a great idea.
|
Ok, on it. I think I know how to fix this. |
I don't think your last commit is the right solution @bnavigator. I think the problem is in Could you leave this alone for a few minutes? Thanks! |
If you allow |
I think it's better to use something that stands for a real |
@ccordoba12 I think what @bnavigator means is that now that workspace is required in Document, it shouldn't be an optional parameter in the constructor. As long as it's optional in the constructor, the code should support the case where it's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is finally ready. Thanks everyone (specially @bnavigator) for your patience.
You're totally @bnavigator and @fsouza! I'll do that last change here. |
Thanks for breaking it down @fsouza. At least in the tests it happens all the time. And these are only the one-liners:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Thanks a bunch to everyone involved! If possible, please tag a release with this included. It'll help downstream Linux distros quite a lot. |
Thanks for the work getting this fixed :) |
0.32.0 is out. |
https://build.opensuse.org/request/show/810112 by user scarabeus_iv + maxlin_factory - Update to Version 0.33.0 * Add optional class objects to completion list. * Fix completions with one arg. * Remove pycodestyle plugin's dependency on autopep8. - Update to Version 0.32.0 * Increase minimal supported version of flake8 and match flake8 requirements to PyLS ones. * Add support for renaming with Jedi. * Update Jedi calls for its 0.17 API * Fix flake8 io deadlock. * Follow LSP protocol when workspace folders are changed. * Adapt root workspace uri if folder is changed. * Add option to activate fuzzy completions in Jedi - remove pach pyls-pr781-jedi-017.patch merged gh#palantir/python-language-server#781 - Bump requirements in spec file
As discussed in #744 (comment), fixes #744, including most recent Jedi 0.17.0
This is a combination of #775 and dalthviz#1Edit: removed the jedi master branch pulls in the CIs