python-python-lsp-server/python-lsp-server-pr415-flake8deps.patch
Benjamin Greiner d4dcc2baf4 Accepting request 1103621 from home:bnavigator:branches:devel:languages:python
- Add python-lsp-server-pr415-flake8deps.patch
  gh#python-lsp/python-lsp-server#415
- Add python-lsp-server-pr416-jedi-0.19.patch
  gh#python-lsp/python-lsp-server#416

OBS-URL: https://build.opensuse.org/request/show/1103621
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-lsp-server?expand=0&rev=41
2023-08-12 18:12:21 +00:00

136 lines
4.4 KiB
Diff

From 181db703d6fad6baa5c57ee24a07068f5101f5d1 Mon Sep 17 00:00:00 2001
From: Chih-Hsuan Yen <645432-yan12125@users.noreply.gitlab.com>
Date: Sat, 12 Aug 2023 12:41:38 +0800
Subject: [PATCH 1/4] Add support for pyflakes 3.1
`ContinueInFinally` is dropped in pyflakes 3.1 [1].
flake8 is bumped to a version that supports pyflakes 3.1 [2].
Closes https://github.com/python-lsp/python-lsp-server/issues/412
[1] https://github.com/PyCQA/pyflakes/pull/752
[2] https://flake8.pycqa.org/en/latest/release-notes/6.1.0.html
---
pylsp/plugins/pyflakes_lint.py | 1 -
pyproject.toml | 8 ++++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/pylsp/plugins/pyflakes_lint.py b/pylsp/plugins/pyflakes_lint.py
index 72e16a2e..2c3c3293 100644
--- a/pylsp/plugins/pyflakes_lint.py
+++ b/pylsp/plugins/pyflakes_lint.py
@@ -15,7 +15,6 @@
messages.YieldOutsideFunction,
messages.ContinueOutsideLoop,
messages.BreakOutsideLoop,
- messages.ContinueInFinally,
messages.TwoStarredExpressions,
)
diff --git a/pyproject.toml b/pyproject.toml
index 7e62d24c..c69f92f6 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -28,22 +28,22 @@ Homepage = "https://github.com/python-lsp/python-lsp-server"
[project.optional-dependencies]
all = [
"autopep8>=1.6.0,<2.1.0",
- "flake8>=5.0.0,<7",
+ "flake8>=6.1.0,<7",
"mccabe>=0.7.0,<0.8.0",
"pycodestyle>=2.9.0,<2.11.0",
"pydocstyle>=6.3.0,<6.4.0",
- "pyflakes>=2.5.0,<3.1.0",
+ "pyflakes>=3.1.0,<3.2.0",
"pylint>=2.5.0,<3",
"rope>1.2.0",
"yapf>=0.33.0",
"whatthepatch>=1.0.2,<2.0.0"
]
autopep8 = ["autopep8>=1.6.0,<2.1.0"]
-flake8 = ["flake8>=5.0.0,<7"]
+flake8 = ["flake8>=6.1.0,<7"]
mccabe = ["mccabe>=0.7.0,<0.8.0"]
pycodestyle = ["pycodestyle>=2.9.0,<2.11.0"]
pydocstyle = ["pydocstyle>=6.3.0,<6.4.0"]
-pyflakes = ["pyflakes>=2.5.0,<3.1.0"]
+pyflakes = ["pyflakes>=3.1.0,<3.2.0"]
pylint = ["pylint>=2.5.0,<3"]
rope = ["rope>1.2.0"]
yapf = ["yapf>=0.33.0", "whatthepatch>=1.0.2,<2.0.0"]
From fe31435d83d3a25c92cf0d974b09f1ee7d7b94eb Mon Sep 17 00:00:00 2001
From: Chih-Hsuan Yen <1937689+yan12125@users.noreply.github.com>
Date: Sun, 13 Aug 2023 01:10:51 +0800
Subject: [PATCH 2/4] Update pyproject.toml
Co-authored-by: Carlos Cordoba <ccordoba12@gmail.com>
---
pyproject.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyproject.toml b/pyproject.toml
index c69f92f6..2379ce2b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -30,7 +30,7 @@ all = [
"autopep8>=1.6.0,<2.1.0",
"flake8>=6.1.0,<7",
"mccabe>=0.7.0,<0.8.0",
- "pycodestyle>=2.9.0,<2.11.0",
+ "pycodestyle>=2.11.0,<2.12.0",
"pydocstyle>=6.3.0,<6.4.0",
"pyflakes>=3.1.0,<3.2.0",
"pylint>=2.5.0,<3",
From 952a73d2fdbbc8ad42f22aa29a10697d32155a3c Mon Sep 17 00:00:00 2001
From: Chih-Hsuan Yen <1937689+yan12125@users.noreply.github.com>
Date: Sun, 13 Aug 2023 01:10:57 +0800
Subject: [PATCH 3/4] Update pyproject.toml
Co-authored-by: Carlos Cordoba <ccordoba12@gmail.com>
---
pyproject.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyproject.toml b/pyproject.toml
index 2379ce2b..60a36b99 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -41,7 +41,7 @@ all = [
autopep8 = ["autopep8>=1.6.0,<2.1.0"]
flake8 = ["flake8>=6.1.0,<7"]
mccabe = ["mccabe>=0.7.0,<0.8.0"]
-pycodestyle = ["pycodestyle>=2.9.0,<2.11.0"]
+pycodestyle = ["pycodestyle>=2.11.0,<2.12.0"]
pydocstyle = ["pydocstyle>=6.3.0,<6.4.0"]
pyflakes = ["pyflakes>=3.1.0,<3.2.0"]
pylint = ["pylint>=2.5.0,<3"]
From 295e4df835bc7025699c59ee303662b02959e2c2 Mon Sep 17 00:00:00 2001
From: Chih-Hsuan Yen <645432-yan12125@users.noreply.gitlab.com>
Date: Sun, 13 Aug 2023 01:15:26 +0800
Subject: [PATCH 4/4] Use newer Python for static ananlysis
New flake8 requires Python 3.8 [1].
[1] https://flake8.pycqa.org/en/latest/release-notes/6.0.0.html
---
.github/workflows/static.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml
index 7a398c0b..3eefea21 100644
--- a/.github/workflows/static.yml
+++ b/.github/workflows/static.yml
@@ -32,7 +32,7 @@ jobs:
with:
# TODO: check with Python 3, but need to fix the
# errors first
- python-version: '3.7'
+ python-version: '3.8'
architecture: 'x64'
- run: python -m pip install --upgrade pip setuptools jsonschema
- run: pip install -e .[pylint,pycodestyle,pyflakes]