pappasam / coc-jedi

coc.nvim wrapper for https://github.com/pappasam/jedi-language-server
MIT License
229 stars 9 forks source link

Install importlib_metadata in the virtualenv #32

Closed Fenkiou closed 3 years ago

Fenkiou commented 3 years ago

Hello,

I'm currently experiencing a small issue (not a blocking one at all).

I started to use coc, with coc-jedi using a python version >=3.8 and that worked perfectly.

But recently, I launched vim inside a project which uses python 3.6.6. And update coc plugins.

Seems like coc-jedi needed an update (and jedi-language-server too was outdated). So coc-jedi ran the update but it ran it using the python 3.6.6 interpreter.

So the virtualenv created is based on python 3.6.6 and now each time coc-jedi starts to run, it tries to get the version, but it cannot retrieve it because if we're below 3.8, we have to use importlib_metadata (see here) which is not installed. So it recreate the virtualenv each time.

I can fix the issue either by:

Can we add importlib_metadata package installation inside the virtualenv? Or maybe there is another solution :)

Anyway, thanks for the plugin!

pappasam commented 3 years ago

Thanks for this issue! I'll add a conditional dependency for importlib_metadata to jedi-language-server and release later today

pappasam commented 3 years ago

Should be resolved in version 0.25.2!

Fenkiou commented 3 years ago

Works perfectly, thanks for the quick fix!