From 9cfee747cefcd0f37c3c38bbeb66ba44ac494a384829e62e0f412f15385c4b9a Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Sun, 14 Nov 2021 20:22:29 +0000 Subject: [PATCH] Accepting request 931425 from home:bnavigator:branches:devel:languages:python - Add python-lsp-server-pr102-unpin-flake8.patch with excessive BR pinning of other optional dependencies OBS-URL: https://build.opensuse.org/request/show/931425 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-lsp-server?expand=0&rev=7 --- python-lsp-server-pr102-unpin-flake8.patch | 44 ++++++++++++++++++++++ python-python-lsp-server.changes | 6 +++ python-python-lsp-server.spec | 20 +++++----- 3 files changed, 61 insertions(+), 9 deletions(-) create mode 100644 python-lsp-server-pr102-unpin-flake8.patch diff --git a/python-lsp-server-pr102-unpin-flake8.patch b/python-lsp-server-pr102-unpin-flake8.patch new file mode 100644 index 0000000..1fda4a2 --- /dev/null +++ b/python-lsp-server-pr102-unpin-flake8.patch @@ -0,0 +1,44 @@ +From e51767c76ab294645917536f44bce9a1b9342649 Mon Sep 17 00:00:00 2001 +From: Carlos Cordoba +Date: Sat, 30 Oct 2021 12:42:28 -0500 +Subject: [PATCH 1/3] Update requirement on flake8 and its dependencies + +--- + setup.py | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +Index: python-lsp-server-1.2.4/setup.py +=================================================================== +--- python-lsp-server-1.2.4.orig/setup.py ++++ python-lsp-server-1.2.4/setup.py +@@ -46,22 +46,22 @@ setup( + python_requires='>=3.6', + extras_require={ + 'all': [ +- 'autopep8', +- 'flake8>=3.8.0,<4.0.0', ++ 'autopep8>=1.6.0,<1.7.0', ++ 'flake8>=4.0.0,<4.1.0', + 'mccabe>=0.6.0,<0.7.0', +- 'pycodestyle>=2.7.0', ++ 'pycodestyle>=2.8.0,<2.9.0', + 'pydocstyle>=2.0.0', +- 'pyflakes>=2.3.0,<2.4.0', ++ 'pyflakes>=2.5.0,<2.5.0', + 'pylint>=2.5.0,<2.10.0', + 'rope>=0.10.5', + 'yapf', + ], +- 'autopep8': ['autopep8'], +- 'flake8': ['flake8>=3.8.0,<4.0.0'], ++ 'autopep8': ['autopep8>=1.6.0,<1.7.0'], ++ 'flake8': ['flake8>=4.0.0,<4.1.0'], + 'mccabe': ['mccabe>=0.6.0,<0.7.0'], +- 'pycodestyle': ['pycodestyle>=2.7.0'], ++ 'pycodestyle': ['pycodestyle>=2.8.0,<2.9.0'], + 'pydocstyle': ['pydocstyle>=2.0.0'], +- 'pyflakes': ['pyflakes>=2.3.0,<2.4.0'], ++ 'pyflakes': ['pyflakes>=2.4.0,<2.5.0'], + 'pylint': ['pylint>=2.5.0,<2.10.0'], + 'rope': ['rope>0.10.5'], + 'yapf': ['yapf'], diff --git a/python-python-lsp-server.changes b/python-python-lsp-server.changes index 10cdc6a..fb561fd 100644 --- a/python-python-lsp-server.changes +++ b/python-python-lsp-server.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Nov 14 18:43:15 UTC 2021 - Ben Greiner + +- Add python-lsp-server-pr102-unpin-flake8.patch with excessive + BR pinning of other optional dependencies + ------------------------------------------------------------------- Wed Oct 27 13:16:45 UTC 2021 - Ben Greiner diff --git a/python-python-lsp-server.spec b/python-python-lsp-server.spec index 73acfaf..a56d7c7 100644 --- a/python-python-lsp-server.spec +++ b/python-python-lsp-server.spec @@ -25,19 +25,21 @@ Summary: Python Language Server for the Language Server Protocol License: MIT URL: https://github.com/python-lsp/python-lsp-server Source: https://files.pythonhosted.org/packages/source/p/python-lsp-server/python-lsp-server-%{version}.tar.gz +# PATCH-FIX-UPSTREAM python-lsp-server-pr102-unpin-flake8.patch -- gh#python-lsp/python-lsp-server#102 +Patch0: python-lsp-server-pr102-unpin-flake8.patch BuildRequires: %{python_module setuptools >= 39.0.0} BuildRequires: python-rpm-macros >= 20210628 # SECTION test requirements BuildRequires: %{python_module jedi >= 0.17.2} BuildRequires: %{python_module PyQt5} -BuildRequires: %{python_module autopep8} -BuildRequires: %{python_module flake8 >= 3.8.0 with %python-flake8 < 4} +BuildRequires: %{python_module autopep8 >= 1.6.0 with %python-autopep8 < 1.7.0} +BuildRequires: %{python_module flake8 >= 4.0.0 with %python-flake8 < 4.1.0} BuildRequires: %{python_module flaky} BuildRequires: %{python_module mccabe >= 0.6.0} BuildRequires: %{python_module pluggy} -BuildRequires: %{python_module pycodestyle >= 2.7.0} +BuildRequires: %{python_module pycodestyle >= 2.8.0 with %python-pycodestyle < 2.9.0} BuildRequires: %{python_module pydocstyle >= 2.0.0} -BuildRequires: %{python_module pyflakes >= 2.3.0} +BuildRequires: %{python_module pyflakes >= 2.4.0 with %python-pyflakes < 2.5.0} BuildRequires: %{python_module pylint >= 2.5.0} BuildRequires: %{python_module pytest} BuildRequires: %{python_module python-lsp-jsonrpc >= 1.0.0} @@ -54,12 +56,12 @@ Requires: python-pluggy Requires: python-python-lsp-jsonrpc >= 1.0.0 Requires: python-setuptools >= 39.0.0 Requires: python-ujson >= 3.0.0 -Suggests: python-autopep8 -Suggests: (python-flake8 >= 3.8.0 with python-flake8 < 4) +Suggests: python-autopep8 >= 1.6.0 +Suggests: python-flake8 >= 4.0.0 Suggests: python-mccabe >= 0.6.0 -Suggests: python-pycodestyle >= 2.7.0 +Suggests: python-pycodestyle >= 2.8.0 Suggests: python-pydocstyle >= 2.0.0 -Suggests: python-pyflakes >= 2.3.0 +Suggests: python-pyflakes >= 2.4.0 Suggests: python-pylint >= 2.5.0 Suggests: python-rope >= 0.10.5 Suggests: python-yapf @@ -86,7 +88,7 @@ will be enabled: - YAPF for code formatting (preferred over autopep8) %prep -%setup -q -n python-lsp-server-%{version} +%autosetup -p1 -n python-lsp-server-%{version} # the only relevant changes from https://github.com/python-lsp/python-lsp-server/pull/94 sed -i 's/pylint>=2.5.0,<2.10.0/pylint>=2.5.0/' setup.py sed -i "s/open(document.path, 'w')/open(document.path, 'w', encoding='utf-8')/" test/plugins/test_pylint_lint.py