George Rawlinson pushed to branch main at Arch Linux / Packaging / Packages / 
python-lsp-black


Commits:
63684596 by loqs at 2026-03-04T19:27:58+00:00
Remove pkg_resources

Related https://archlinux.org/todo/python-pkg_resources-deprecation/.

- - - - -


5 changed files:

- .SRCINFO
- + LICENSES/MIT.txt
- PKGBUILD
- REUSE.toml
- + python-lsp-black-2.0.0-remove-pkg_resources.patch


Changes:

=====================================
.SRCINFO
=====================================
@@ -14,7 +14,9 @@ pkgbase = python-lsp-black
        depends = python-lsp-server
        source = 
https://github.com/python-lsp/python-lsp-black/archive/v2.0.0/python-lsp-black-2.0.0.tar.gz
        source = 
https://github.com/python-lsp/python-lsp-black/commit/74d7ae8d.patch
+       source = python-lsp-black-2.0.0-remove-pkg_resources.patch
        sha256sums = 
6387584c38e5758431f5d61c269860892f57b7442c0cf9bd712ad64231b9bb1c
        sha256sums = 
8d552419665fb489e3ece681f0313bd386b27e89978a57ad10eebb5cb90349dd
+       sha256sums = 
35677a60c630b38c76b5245310fcb5cf8aa36fc80f34dec3a6bdebb6d86e1ea5
 
 pkgname = python-lsp-black


=====================================
LICENSES/MIT.txt
=====================================
@@ -0,0 +1,18 @@
+MIT License
+
+Copyright (c) <year> <copyright holders>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy 
of this software and
+associated documentation files (the "Software"), to deal in the Software 
without restriction, including
+without limitation the rights to use, copy, modify, merge, publish, 
distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is 
furnished to do so, subject to the
+following conditions:
+
+The above copyright notice and this permission notice shall be included in all 
copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
IMPLIED, INCLUDING BUT NOT
+LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE 
AND NONINFRINGEMENT. IN NO
+EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES 
OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
CONNECTION WITH THE SOFTWARE OR THE
+USE OR OTHER DEALINGS IN THE SOFTWARE.


=====================================
PKGBUILD
=====================================
@@ -16,12 +16,15 @@ makedepends=(
 )
 checkdepends=(python-pytest)
 source=(${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz
-        https://github.com/python-lsp/python-lsp-black/commit/74d7ae8d.patch)
+        https://github.com/python-lsp/python-lsp-black/commit/74d7ae8d.patch
+        python-lsp-black-2.0.0-remove-pkg_resources.patch)
 sha256sums=('6387584c38e5758431f5d61c269860892f57b7442c0cf9bd712ad64231b9bb1c'
-            '8d552419665fb489e3ece681f0313bd386b27e89978a57ad10eebb5cb90349dd')
+            '8d552419665fb489e3ece681f0313bd386b27e89978a57ad10eebb5cb90349dd'
+            '35677a60c630b38c76b5245310fcb5cf8aa36fc80f34dec3a6bdebb6d86e1ea5')
 
 prepare() {
   patch -d $pkgname-$pkgver -p1 < 74d7ae8d.patch # Fix tests with bleck 24.3
+  patch -d $pkgname-$pkgver -p1 < 
python-lsp-black-2.0.0-remove-pkg_resources.patch
 }
 
 build() {


=====================================
REUSE.toml
=====================================
@@ -20,3 +20,10 @@ path = [
 ]
 SPDX-FileCopyrightText = "Arch Linux contributors"
 SPDX-License-Identifier = "0BSD"
+
+[[annotations]]
+path = [
+    "python-lsp-black-2.0.0-remove-pkg_resources.patch",
+]
+SPDX-FileCopyrightText = "python-lsp-black contributors"
+SPDX-License-Identifier = "MIT"


=====================================
python-lsp-black-2.0.0-remove-pkg_resources.patch
=====================================
@@ -0,0 +1,26 @@
+diff --git a/tests/test_plugin.py b/tests/test_plugin.py
+index 0a51767..41f1198 100644
+--- a/tests/test_plugin.py
++++ b/tests/test_plugin.py
+@@ -2,10 +2,10 @@
+ import types
+ from pathlib import Path
+ from unittest.mock import Mock
++from importlib.metadata import entry_points
+ 
+ # Third-party imports
+ import black
+-import pkg_resources
+ import pytest
+ 
+ # Python LSP imports
+@@ -307,8 +307,7 @@ def 
test_load_config_with_skip_options(config_with_skip_options):
+ 
+ 
+ def test_entry_point():
+-    distribution = pkg_resources.get_distribution("python-lsp-black")
+-    entry_point = distribution.get_entry_info("pylsp", "black")
++    (entry_point,) = entry_points(group="pylsp", name="black")
+ 
+     assert entry_point is not None
+ 



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-lsp-black/-/commit/63684596e2c97405e918e6b24d9fddd3fcd8b5ed

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-lsp-black/-/commit/63684596e2c97405e918e6b24d9fddd3fcd8b5ed
You're receiving this email because of your account on gitlab.archlinux.org. 
Manage all notifications: https://gitlab.archlinux.org/-/profile/notifications 
| Help: https://gitlab.archlinux.org/help


Reply via email to