-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
Use the new Jedi API #1025
Use the new Jedi API #1025
Conversation
…ause of changes in Jedi
It should mostly still work (except for :Pyimport), but it won't pass all the tests anymore. Since I'm dropping Python 2 in Jedi anyways, it makes sense to also remove it here.
The CI is finally passing now. I removed Python 2 support in the CI. I'm going to release the next Jedi version very soon which drops Python 2. So I guess it's fine to remove support here. It still works with Python 2 though, that's why I did not remove the |
@blueyed I would like to merge this, because I would like to make it compatible with Jedi 0.18.0, which should be released soon. I can understand if you don't have a lot of time to spare. Should I just merge without review regardless? |
Hi @davidhalter I was trying out your branch in the context of my search for #1029 . I'm seeing the following traceback when trying to do a go-to-definition:
fwiw i hacked a quick fix into the diff --git a/jedi/inference/value/module.py b/jedi/inference/value/module.py
index 12d2bfcf..f7987447 100644
--- a/jedi/inference/value/module.py
+++ b/jedi/inference/value/module.py
@@ -156,7 +156,7 @@ class ModuleValue(ModuleMixin, TreeValue):
self._is_package = is_package
def is_stub(self):
- if self._path is not None and self._path.endswith('.pyi'):
+ if self._path is not None and str(self._path).endswith('.pyi'):
# Currently this is the way how we identify stubs when e.g. goto is
# used in them. This could be changed if stubs would be identified
# sooner and used as StubModuleValue. |
I found a few similar errors coming from various places, eg
I see that one's coming from a call to |
@hjwp This branch is probably not working well with the old jedi/parso versions. So please just try to upgrade those submodules to latest master and it should work. I pushed one more fix as well. |
seems to be working well! thanks david :-) i'll close my pr... |
why not update the submodules on this branch? |
Will do that when I'm done with the 0.18.0 release for Jedi. Otherwise I just have to update again and again. |
Hey I just wanted to say thanks for all your work on this David! People are always asking me how the heck I get so much IDE-like functionality out vim. It's all thanks to you <3 |
not forgetting @blueyed and all the other contributors too. thanks for all that you do! |
You're very welcome! Just as a head's up: Jedi-vim is more like a side-project that I use for testing Jedi. If you ever get annoyed by some of its idiosyncrasies, feel free to check out stuff like https://github.com/pappasam/jedi-language-server or all the other Jedi based language servers (there's quite a few of them). Some of these language servers have more Jedi features implemented than jedi-vim. |
Our distro is currently trying to get python 3.9 shippen, but this is one of our issues right now which i believe would tackle our issues. No pressure here and all your work is very much appreciated, but is there any kind of ETC? 🐱 |
23c6455
to
092f8c8
Compare
092f8c8
to
ea52ca5
Compare
Since there wasn't any feedback anymore and the latest Jedi does not work anymore with current jedi-vim, I decided to merge. Includes the switch from Travis CI to GitHub Actions and the submodule upgrades from Jedi 0.17.2 to 0.18.0 as well as the Parso 0.8 upgrade. This makes the removal of Python 2 from the code base final. |
@anthraxx Sorry for not giving you an estimate earlier, but there's really none. It all depends on my mood. Jedi is in general way higher in priority than jedi-vim and now that I'm rewriting stuff in Rust, that is even higher priority, while none of them is my job. So yeah, it's just going to arrive when it does :) |
jedi.Project
now to manage environment paths (This might make parts of [WIP/RFC] Improve selection of environments #836 not necessary):JediChooseEnvironment
(which displays a list of environments that a user can choose):JediLoadProject
, which might need some changes to Jedi to properly work like I want it to.Still thinking about implementing refactorings.
Would be interested in @blueyed's thoughts about these changes.