python-lsp / python-lsp-server

Fork of the python-language-server project, maintained by the Spyder IDE team and the community
MIT License
1.76k stars 186 forks source link

Add support for pyflakes 3.1 #412

Closed yan12125 closed 11 months ago

yan12125 commented 11 months ago

pyflakes 3.1.0 was released a few days ago with Python 3.12 support and various other fixes/improvements [1]. Could you consider bumping version constraints for pyflakes [2]?

I tried removing the upper bound for pyflakes and use it with the latest pyflakes, but no warnings/errors are reported. I guess the issue is that ContinueInFinally is dropped from pyflakes [3], while python-lsp-server still tries to use it [4]. If I removed the line at [4], pyflakes 3.1 works fine with python-lsp-server.

[1] https://github.com/PyCQA/pyflakes/blob/3.1.0/NEWS.rst [2] https://github.com/python-lsp/python-lsp-server/blob/v1.7.4/pyproject.toml#L35 [3] https://github.com/PyCQA/pyflakes/pull/752 [4] https://github.com/python-lsp/python-lsp-server/blob/v1.7.4/pylsp/plugins/pyflakes_lint.py#L18

ccordoba12 commented 11 months ago

Hey @yan12125, thanks for reporting. We can't update to that Pyflakes version before Flake8 adds support for it because we also support Flake8.

So, let us know when that happens and we'll be able to do it.

yan12125 commented 11 months ago

Hi, flake8 6.1.0 has updated Pyflakes to >= 3.1.0, < 3.2.0 [1]. I think that is no longer a blocker?

[1] https://flake8.pycqa.org/en/latest/release-notes/6.1.0.html

ccordoba12 commented 11 months ago

Correct. We'll address this in our next version then.