palantir / python-language-server

An implementation of the Language Server Protocol for Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Two failed tests in test_symbols

juliangilbey opened this issue · comments

The last of my reports about failed tests. There are two tests that failed in test_symbols.py: test_symbols itself and test_symbols_all_scopes, both of which fail by returning an object with length 0 instead of the expected non-zero length.

I have attached the log file from the test failures. I'm using Python 3.9, if that is relevant.

Best wishes, Julian

python-language-server_0.36.2-symbols-test.txt

Let me guess: your jedi is newer than 0.17.2.

Yes :-(
I sadly don't know enough about how jedi works or have the available capacity to help upgrade python-language-server for jedi 0.18 (and parso 0.8), otherwise I'd offer to assist.

The requirements of pyls state to use jedi<0.18.

While I personally don't like pinning versions and have had arguments with the pyls and spyder developers before, in this case it is no wonder you get the errors.

I already submitted #901. I can't guarantee that it is the only necessary change, but it fixes the test failures, which you have reported. Other than that, let's hope we can get it ready for a new release of pyls faster than the last time.

Btw, if you use ipython, it is likely to be broken by updated jedi too: ipython/ipython#12740

Thanks @bnavigator ! Yes, indeed :-( Debian updated its jedi package, and so several other things have broken in its stead.

Ooh that's bad. I thought Debian has some QA to prevent that. We have blocked the update of jedi in openSUSE Tumbleweed.

Hi @bnavigator, I've just had a look at the reason for Debian not blocking the jedi and parso updates: it turns out that parso 0.7 fails to build with Python 3.9, so parso had to be updated to parso 0.8 once Python itself was updated. And if I understand correctly, upgrading parso required jedi to also be upgraded, as they work in tandem.

Thank you so much for the heads up @juliangilbey. Good to know about the problems which we will also run into once we finally enable Python 3.9 in openSUSE Tumbleweed. Hopefully most packages work with Jedi 0.18 and Parso 0.8 by then.