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

Import error in pyls #4

Closed
rwols opened this issue Jul 5, 2020 · 3 comments
Closed

Import error in pyls #4

rwols opened this issue Jul 5, 2020 · 3 comments

Comments

@rwols
Copy link

rwols commented Jul 5, 2020

I'm seeing this import error logged during startup of pyls:

pyls: 2020-07-05 14:07:59,772 UTC - WARNING - pyls.config.config - Failed to load pyls entry point 'pyls_isort': cannot import name 'SortImports' from 'isort' (/home/raoul/.config/sublime-text-3/Cache/LSP-pyls/lib/python3.8/site-packages/isort/__init__.py)

Looks like the SortImports class got removed: PyCQA/isort@c7378c3

@rwols
Copy link
Author

rwols commented Jul 5, 2020

This most likely fixes it:

diff --git a/setup.py b/setup.py
index 8129a8e..d8aefec 100644
--- a/setup.py
+++ b/setup.py
@@ -21,7 +21,7 @@ setup(
     platforms="Any",
     packages=find_packages(),
     provides=['pyls_isort'],
-    install_requires=['python-language-server', 'isort'],
+    install_requires=['python-language-server', 'isort<5,>=4.2.5'],
     entry_points={
         'pyls': ['pyls_isort = pyls_isort.plugin'],
     },

The range is chosen so that pyls_isort will be compatible with pylint's requirement for isort.
ping @paradoxxxzero

@mom1
Copy link

mom1 commented Jul 13, 2020

Probably this will fix this issue.

@paradoxxxzero
Copy link
Owner

0.2.0 is out and fix this

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

No branches or pull requests

3 participants