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

Jedi 0.18 update #354

Merged
merged 8 commits into from
Feb 2, 2021
Merged

Jedi 0.18 update #354

merged 8 commits into from
Feb 2, 2021

Conversation

cfroehli
Copy link
Contributor

@cfroehli cfroehli commented Jan 16, 2021

I noticed the completion was broken after upgrading my emacs setup and looked a bit into it.

Jedi 0.18 seems to drop old, unmaintained python releases and to rename a few class/methods, breaking the epcserver (emit a warning in 0.17.X) :
- line / column are now passed at the method call instead of the jedi.Script init. I didn't want to break the epcserver interface so I've just split the *args to dispatch the parameter where needed.
- renamed a few calls (call_signatures is now get_signatures, ...)
- the desc_with_module attribute is no more available in jedi api (no replacement for now). I've put full_name instead so the method call don't fail but we may want some other value here.

So far, the completion/definition jump is back (using latest company-jedi and fresh emacs master build) but some more exhaustive tests may be required to ensure all features are ok.

Changes are not compatible with older jedi version thus 0.18+ is enforced in setup and test configuration, and the version was bumped to 0.3.0.

This can probably help to fix #348, fix #352, fix #353.

Feel free to comment / request changes.

@return42
Copy link

approved! .. Thanks a lot for the bugfix .. ATM emacs-jedi breaks python workflows, would be great to see this PR merged soon.

@immerrr
Copy link
Collaborator

immerrr commented Jan 29, 2021

Hi, thank you for the contribution. It looks promising. Do you think it is possible to make it backward compatible with relatively low effort?

@cfroehli
Copy link
Contributor Author

I had to make it work real quick before a job interview so I didn't look too much into it, but it is probably not that difficult. I'll add some compatibility layer.

@cfroehli
Copy link
Contributor Author

Python2 & <3.5 are stuck with 0.17.2 at best. If jedi is recent enough, we directly use the new api.
If jedi < 0.16 is installed, we'll use the old api through a thin adapter layer, so less fuss to remove the compatibility code later.
The tests are launched with 2.7 and 3.6 with jedi 0.17.2 and 0.11.1, and latest pythons (3.5~3.9) with jedi 0.18+.

setup.py Outdated Show resolved Hide resolved
jedi-core.el Outdated Show resolved Hide resolved
@immerrr
Copy link
Collaborator

immerrr commented Feb 1, 2021

Thanks, I'm going to merge this after CI reports green.

@immerrr immerrr merged commit 3a9c503 into tkf:master Feb 2, 2021
@immerrr
Copy link
Collaborator

immerrr commented Feb 2, 2021

Thank you so much for getting this through!

@return42
Copy link

return42 commented Feb 8, 2021

Thank you so much for getting this through!

Same from my side .. thanks a lot!!

@immerrr do you have time to build a new release? Would be much comfortable to have this fix in MELPA.

Anyway I would also thanks to you @immerrr, that you give us this comfortable emacs module. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants