From e8be8ee9edacfbcabc65ceff7d4c941e6640100dc801c9a91fd725ed0501757f Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Thu, 19 Jan 2023 16:03:08 +0000 Subject: [PATCH] Accepting request 1059821 from home:bnavigator:branches:devel:languages:python:numeric - Update to 1.7.1 * Fixes an error with the Pydocstyle 6.2.0+ * Includes missing Pylint "information" category. * Improves Jedi file completions for directories. - Drop python-lsp-server-pr327-sys-executable.patch - Add pylsp-pr340-pydocstyle-6.3.patch gh#python-lsp/python-lsp-server#340 OBS-URL: https://build.opensuse.org/request/show/1059821 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-lsp-server?expand=0&rev=31 --- pylsp-pr340-pydocstyle-6.3.patch | 56 ++++++++++++++++++++ python-lsp-server-1.7.0.tar.gz | 3 -- python-lsp-server-1.7.1.tar.gz | 3 ++ python-lsp-server-pr327-sys-executable.patch | 13 ----- python-python-lsp-server.changes | 11 ++++ python-python-lsp-server.spec | 19 ++++--- 6 files changed, 81 insertions(+), 24 deletions(-) create mode 100644 pylsp-pr340-pydocstyle-6.3.patch delete mode 100644 python-lsp-server-1.7.0.tar.gz create mode 100644 python-lsp-server-1.7.1.tar.gz delete mode 100644 python-lsp-server-pr327-sys-executable.patch diff --git a/pylsp-pr340-pydocstyle-6.3.patch b/pylsp-pr340-pydocstyle-6.3.patch new file mode 100644 index 0000000..de74e64 --- /dev/null +++ b/pylsp-pr340-pydocstyle-6.3.patch @@ -0,0 +1,56 @@ +diff --git a/pylsp/plugins/pydocstyle_lint.py b/pylsp/plugins/pydocstyle_lint.py +index 0aa72b7..2e34ccc 100644 +--- a/pylsp/plugins/pydocstyle_lint.py ++++ b/pylsp/plugins/pydocstyle_lint.py +@@ -28,6 +28,7 @@ def pylsp_settings(): + + @hookimpl + def pylsp_lint(config, workspace, document): ++ # pylint: disable=too-many-locals + with workspace.report_progress("lint: pydocstyle"): + settings = config.plugin_settings('pydocstyle', document_path=document.path) + log.debug("Got pydocstyle settings: %s", settings) +@@ -66,9 +67,19 @@ def pylsp_lint(config, workspace, document): + + # Will only yield a single filename, the document path + diags = [] +- for filename, checked_codes, ignore_decorators, property_decorators in conf.get_files_to_check(): ++ for ( ++ filename, ++ checked_codes, ++ ignore_decorators, ++ property_decorators, ++ ignore_self_only_init, ++ ) in conf.get_files_to_check(): + errors = pydocstyle.checker.ConventionChecker().check_source( +- document.source, filename, ignore_decorators=ignore_decorators, property_decorators=property_decorators ++ document.source, ++ filename, ++ ignore_decorators=ignore_decorators, ++ property_decorators=property_decorators, ++ ignore_self_only_init=ignore_self_only_init, + ) + + try: +diff --git a/pyproject.toml b/pyproject.toml +index 8d38434..841638a 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -31,7 +31,7 @@ all = [ + "flake8>=5.0.0,<7", + "mccabe>=0.7.0,<0.8.0", + "pycodestyle>=2.9.0,<2.11.0", +- "pydocstyle>=6.2.0,<6.3.0", ++ "pydocstyle>=6.3.0,<6.4.0", + "pyflakes>=2.5.0,<3.1.0", + "pylint>=2.5.0,<3", + "rope>1.2.0", +@@ -42,7 +42,7 @@ autopep8 = ["autopep8>=1.6.0,<1.7.0"] + flake8 = ["flake8>=5.0.0,<7"] + mccabe = ["mccabe>=0.7.0,<0.8.0"] + pycodestyle = ["pycodestyle>=2.9.0,<2.11.0"] +-pydocstyle = ["pydocstyle>=6.2.0,<6.3.0"] ++pydocstyle = ["pydocstyle>=6.3.0,<6.4.0"] + pyflakes = ["pyflakes>=2.5.0,<3.1.0"] + pylint = ["pylint>=2.5.0,<3"] + rope = ["rope>1.2.0"] diff --git a/python-lsp-server-1.7.0.tar.gz b/python-lsp-server-1.7.0.tar.gz deleted file mode 100644 index 9b1e894..0000000 --- a/python-lsp-server-1.7.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:401ce78ea2e98cadd02d94962eb32c92879caabc8055b9a2f36d7ef44acc5435 -size 95085 diff --git a/python-lsp-server-1.7.1.tar.gz b/python-lsp-server-1.7.1.tar.gz new file mode 100644 index 0000000..da078ca --- /dev/null +++ b/python-lsp-server-1.7.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67473bb301f35434b5fa8b21fc5ed5fac27dc8a8446ccec8bae456af52a0aef6 +size 95731 diff --git a/python-lsp-server-pr327-sys-executable.patch b/python-lsp-server-pr327-sys-executable.patch deleted file mode 100644 index d0688ab..0000000 --- a/python-lsp-server-pr327-sys-executable.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/pylsp/plugins/pylint_lint.py b/pylsp/plugins/pylint_lint.py -index 452f45b..222cdb8 100644 ---- a/pylsp/plugins/pylint_lint.py -+++ b/pylsp/plugins/pylint_lint.py -@@ -85,7 +85,7 @@ class PylintLinter: - return cls.last_diags[document.path] - - cmd = [ -- 'python', -+ sys.executable, - '-c', - 'import sys; from pylint.lint import Run; Run(sys.argv[1:])', - '-f', diff --git a/python-python-lsp-server.changes b/python-python-lsp-server.changes index 2c317fd..a713a84 100644 --- a/python-python-lsp-server.changes +++ b/python-python-lsp-server.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu Jan 19 10:10:31 UTC 2023 - Ben Greiner + +- Update to 1.7.1 + * Fixes an error with the Pydocstyle 6.2.0+ + * Includes missing Pylint "information" category. + * Improves Jedi file completions for directories. +- Drop python-lsp-server-pr327-sys-executable.patch +- Add pylsp-pr340-pydocstyle-6.3.patch + gh#python-lsp/python-lsp-server#340 + ------------------------------------------------------------------- Fri Dec 30 09:46:15 UTC 2022 - Ben Greiner diff --git a/python-python-lsp-server.spec b/python-python-lsp-server.spec index 956fbd9..41d8427 100644 --- a/python-python-lsp-server.spec +++ b/python-python-lsp-server.spec @@ -17,14 +17,14 @@ Name: python-python-lsp-server -Version: 1.7.0 +Version: 1.7.1 Release: 0 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-pr327-sys-executable.patch gh#python-lsp/python-lsp-server#327 -Patch1: python-lsp-server-pr327-sys-executable.patch +# PATCH-FIX-UPSTREAM pylsp-pr340-pydocstyle-6.3.patch gh#python-lsp/python-lsp-server#340 +Patch1: pylsp-pr340-pydocstyle-6.3.patch BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools >= 61.2} @@ -43,13 +43,13 @@ BuildRequires: %{python_module matplotlib} BuildRequires: %{python_module numpy} BuildRequires: %{python_module pandas} BuildRequires: %{python_module pluggy} -BuildRequires: %{python_module pydocstyle >= 2.0.0} -BuildRequires: %{python_module pylint >= 2.5.0} +BuildRequires: %{python_module pydocstyle >= 6.3.0 with %python-pydocstyle < 6.4.0} +BuildRequires: %{python_module pylint >= 2.5.0 with %python-pylint < 3} BuildRequires: %{python_module pytest} BuildRequires: %{python_module python-lsp-jsonrpc >= 1.0.0} BuildRequires: %{python_module rope >= 1.2.0} BuildRequires: %{python_module ujson >= 3.0.0} -BuildRequires: %{python_module whatthepatch} +BuildRequires: %{python_module whatthepatch >= 1.0.2 with %python-whatthepatch < 2} BuildRequires: %{python_module yapf} # /SECTION BuildRequires: fdupes @@ -61,11 +61,14 @@ Requires: python-ujson >= 3.0.0 Requires: (python-jedi >= 0.17.2 with python-jedi < 0.19.0) Suggests: python-autopep8 >= 1.6.0 Conflicts: python-autopep8 >= 1.7.0 -Suggests: python-pydocstyle >= 2.0.0 +Suggests: python-pydocstyle >= 6.3.0 +Conflicts: python-pydocstyle >= 6.4.0 Suggests: python-pylint >= 2.5.0 +Conflicts: python-pylint >= 3 Suggests: python-rope >= 1.2.0 Suggests: python-yapf -Suggests: python-whatthepatch +Suggests: python-whatthepatch >= 1.0.2 +Conflicts: python-whatthepatch >= 2 # SECTION flake8 pins Suggests: python-flake8 >= 5.0.0 Conflicts: python-flake8 >= 7