From abde5388ba11ea84c9e42213b1463d67d0e9bd1e101e6da1882c09afb6f1d205 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Wed, 25 Dec 2024 10:24:30 +0000 Subject: [PATCH] - Add pylsp-issues-602-605.patch * Changed fuzzy jedi completion gh#python-lsp/python-lsp-server#602 * Disable DEBUG logging for tests gh#python-lsp/python-lsp-server#605 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-lsp-server?expand=0&rev=70 --- pylsp-issues-602-605.patch | 29 +++++++++++++++++++++++++++++ python-python-lsp-server.changes | 9 +++++++++ python-python-lsp-server.spec | 2 ++ 3 files changed, 40 insertions(+) create mode 100644 pylsp-issues-602-605.patch diff --git a/pylsp-issues-602-605.patch b/pylsp-issues-602-605.patch new file mode 100644 index 0000000..8a9bc08 --- /dev/null +++ b/pylsp-issues-602-605.patch @@ -0,0 +1,29 @@ +* Changed fuzzy jedi completion + gh#python-lsp/python-lsp-server#602 +* Disable DEBUG logging for tests + gh#python-lsp/python-lsp-server#605 + +diff -ur python_lsp_server-1.12.0.orig/test/conftest.py python_lsp_server-1.12.0/test/conftest.py +--- python_lsp_server-1.12.0.orig/test/conftest.py 2024-12-25 11:04:59.271951606 +0100 ++++ python_lsp_server-1.12.0/test/conftest.py 2024-12-25 11:05:15.935801063 +0100 +@@ -7,7 +7,7 @@ + + from pylsp.__main__ import LOG_FORMAT + +-logging.basicConfig(level=logging.DEBUG, format=LOG_FORMAT) ++logging.basicConfig(level=logging.WARN, format=LOG_FORMAT) + + + pytest_plugins = ["test.fixtures"] +diff -ur python_lsp_server-1.12.0.orig/test/plugins/test_completion.py python_lsp_server-1.12.0/test/plugins/test_completion.py +--- python_lsp_server-1.12.0.orig/test/plugins/test_completion.py 2024-12-25 11:04:59.271951606 +0100 ++++ python_lsp_server-1.12.0/test/plugins/test_completion.py 2024-12-25 11:12:34.059344572 +0100 +@@ -182,6 +182,8 @@ + expected = "commonprefix(m)" + if JEDI_VERSION == "0.18.0": + expected = "commonprefix(list)" ++ if tuple([int(i) for i in JEDI_VERSION.split(".")]) >= (0,19,2): ++ expected = "isabs(s)" + assert items[0]["label"] == expected + + # Test we don't throw with big character diff --git a/python-python-lsp-server.changes b/python-python-lsp-server.changes index 37ea5ba..18f0acf 100644 --- a/python-python-lsp-server.changes +++ b/python-python-lsp-server.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Dec 25 09:59:30 UTC 2024 - Ben Greiner + +- Add pylsp-issues-602-605.patch + * Changed fuzzy jedi completion + gh#python-lsp/python-lsp-server#602 + * Disable DEBUG logging for tests + gh#python-lsp/python-lsp-server#605 + ------------------------------------------------------------------- Tue Nov 19 10:52:11 UTC 2024 - Dirk Müller diff --git a/python-python-lsp-server.spec b/python-python-lsp-server.spec index 6d34862..0212009 100644 --- a/python-python-lsp-server.spec +++ b/python-python-lsp-server.spec @@ -26,6 +26,8 @@ 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 Patch1: unpin-autopep8.patch +# PATCH-FIX-UPSTREAM pylsp-issues-602-605.patch gh#python-lsp/python-lsp-server#602 gh#python-lsp/python-lsp-server#605 +Patch2: pylsp-issues-602-605.patch BuildRequires: %{python_module base >= 3.8} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools >= 61.2}