From 55876604c6f4b5a8173435119cc09611b57ad016 Mon Sep 17 00:00:00 2001 From: bnavigator <> Date: Sun, 3 Mar 2024 19:19:42 +0000 Subject: [PATCH] Update python-python-lsp-black to version 2.0.0 / rev 9 via SR 1154412 https://build.opensuse.org/request/show/1154412 by user bnavigator + dimstar_suse - Add python-lsp-black-pr56-black24.2.patch gh#python-lsp/python-lsp-black#56 (forwarded request 1154411 from bnavigator) --- packages/p/python-python-lsp-black/.files | Bin 216 -> 291 bytes packages/p/python-python-lsp-black/.rev | 9 +++ .../python-lsp-black-pr56-black24.2.patch | 60 ++++++++++++++++++ .../python-python-lsp-black.changes | 6 ++ .../python-python-lsp-black.spec | 4 +- 5 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 packages/p/python-python-lsp-black/python-lsp-black-pr56-black24.2.patch diff --git a/packages/p/python-python-lsp-black/.files b/packages/p/python-python-lsp-black/.files index 2fe8b1fb9c8575adf8c689bbe29d5b3c2ec25dc6..eb132f0438facabe917bafea75777907c27d6ccb 100644 GIT binary patch delta 175 zcmXBMyA8rH5CG8d6H-`!jucQjx^sN7y#W$a`20~MBCsG0Q=rVi5)=%=IDqJ0_1=@m zROIUbi*i;J#k{PVgvx+3)PQP&PR1c3k&mb)G4S}T4rOHnC1z+D9a@TPEQ7aX5S)e( z>3i++ZRpM?(O+!z)0Ksf8S^xk5 delta 93 zcmWN{!4W_(5Cza+TxcT0*-RqY#P2{GS+Zv{G{VVUQ_A6;-&4LtyX}Xmn@TBFo%gH} u9ShR9cv_JHO+GV85TD>8Lb!^)YqVvU>_?g`1pj5Qh_!}XTvp0*4*CODH5d^9 diff --git a/packages/p/python-python-lsp-black/.rev b/packages/p/python-python-lsp-black/.rev index d7c2c64d272..15acfe9873f 100644 --- a/packages/p/python-python-lsp-black/.rev +++ b/packages/p/python-python-lsp-black/.rev @@ -83,4 +83,13 @@ - Be clear that we require lsp-jsonrpc, because the test suite does. 1137135 + + 83f45275dec5b82e78833f02141a3ce4 + 2.0.0 + + dimstar_suse + - Add python-lsp-black-pr56-black24.2.patch + gh#python-lsp/python-lsp-black#56 (forwarded request 1154411 from bnavigator) + 1154412 + diff --git a/packages/p/python-python-lsp-black/python-lsp-black-pr56-black24.2.patch b/packages/p/python-python-lsp-black/python-lsp-black-pr56-black24.2.patch new file mode 100644 index 00000000000..b013e092078 --- /dev/null +++ b/packages/p/python-python-lsp-black/python-lsp-black-pr56-black24.2.patch @@ -0,0 +1,60 @@ +From d43b41431379f9c9bb05fab158c4d97e6d515f8f Mon Sep 17 00:00:00 2001 +From: Johannes Schauer Marin Rodrigues +Date: Tue, 20 Feb 2024 07:44:20 +0100 +Subject: [PATCH] Make tests work with black 24.2.0 + +Closes: #55 +--- + setup.cfg | 2 ++ + tests/test_plugin.py | 18 ++++++++++++++++-- + 2 files changed, 18 insertions(+), 2 deletions(-) + +diff --git a/setup.cfg b/setup.cfg +index a4fefd3..5103bcb 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -22,6 +22,8 @@ install_requires = + python-lsp-server>=1.4.0 + black>=23.11.0 + tomli; python_version<'3.11' ++tests_require = ++ black>=24.2.0 + python_requires = >= 3.8 + + [options.entry_points] +diff --git a/tests/test_plugin.py b/tests/test_plugin.py +index 0a51767..2ae8088 100644 +--- a/tests/test_plugin.py ++++ b/tests/test_plugin.py +@@ -281,7 +281,14 @@ def test_load_config_defaults(config): + + assert config == { + "line_length": 88, +- "target_version": set(), ++ "target_version": set( ++ [ ++ black.TargetVersion.PY38, ++ black.TargetVersion.PY39, ++ black.TargetVersion.PY310, ++ black.TargetVersion.PY311, ++ ] ++ ), + "pyi": False, + "fast": False, + "skip_magic_trailing_comma": False, +@@ -297,7 +304,14 @@ def test_load_config_with_skip_options(config_with_skip_options): + + assert config == { + "line_length": 88, +- "target_version": set(), ++ "target_version": set( ++ [ ++ black.TargetVersion.PY38, ++ black.TargetVersion.PY39, ++ black.TargetVersion.PY310, ++ black.TargetVersion.PY311, ++ ] ++ ), + "pyi": False, + "fast": False, + "skip_magic_trailing_comma": True, diff --git a/packages/p/python-python-lsp-black/python-python-lsp-black.changes b/packages/p/python-python-lsp-black/python-python-lsp-black.changes index 47bbdd99370..233fd4d4f0d 100644 --- a/packages/p/python-python-lsp-black/python-python-lsp-black.changes +++ b/packages/p/python-python-lsp-black/python-python-lsp-black.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Mar 3 11:20:47 UTC 2024 - Ben Greiner + +- Add python-lsp-black-pr56-black24.2.patch + gh#python-lsp/python-lsp-black#56 + ------------------------------------------------------------------- Fri Jan 5 18:15:23 UTC 2024 - Dirk Müller diff --git a/packages/p/python-python-lsp-black/python-python-lsp-black.spec b/packages/p/python-python-lsp-black/python-python-lsp-black.spec index e5132ea674b..748947bedcf 100644 --- a/packages/p/python-python-lsp-black/python-python-lsp-black.spec +++ b/packages/p/python-python-lsp-black/python-python-lsp-black.spec @@ -24,6 +24,8 @@ Summary: Black plugin for the Python LSP Server License: MIT URL: https://github.com/python-lsp/python-lsp-black Source: https://github.com/python-lsp/python-lsp-black/archive/refs/tags/v%{version}.tar.gz#/python-lsp-black-%{version}-gh.tar.gz +# PATCH-FIX-UPSTREAM python-lsp-black-pr56-black24.2.patch gh#python-lsp/python-lsp-black#56 +Patch0: https://github.com/python-lsp/python-lsp-black/pull/56.patch#/python-lsp-black-pr56-black24.2.patch BuildRequires: %{python_module base >= 3.8} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} @@ -56,7 +58,7 @@ To avoid unexpected results you should make sure yapf and autopep8 are not insta - python-lsp-black will use your project's pyproject.toml if it has one. %prep -%setup -q -n python-lsp-black-%{version} +%autosetup -p1 -n python-lsp-black-%{version} %build %pyproject_wheel