public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-lsp-black] f44: Patch for pkg_resources removal from setuptools
@ 2026-07-15 10:37 Benjamin A. Beasley
0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-07-15 10:37 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-lsp-black
Branch : f44
Commit : d5f849a21e7253076eedf42acd3595b0adddc2a4
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2026-07-14T14:32:03+01:00
Stats : +53/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-lsp-black/c/d5f849a21e7253076eedf42acd3595b0adddc2a4?branch=f44
Log:
Patch for pkg_resources removal from setuptools
---
diff --git a/64.patch b/64.patch
new file mode 100644
index 0000000..034e945
--- /dev/null
+++ b/64.patch
@@ -0,0 +1,49 @@
+From 077c3e5e8720c6cb9e99483a8fd53899a007a0e9 Mon Sep 17 00:00:00 2001
+From: "Benjamin A. Beasley" <code@musicinmybrain.net>
+Date: Tue, 14 Jul 2026 10:52:12 +0100
+Subject: [PATCH] Migrate test_entry_point from pkg_resources to
+ importlib.metadata
+
+---
+ tests/test_plugin.py | 15 +++++++++------
+ 1 file changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/tests/test_plugin.py b/tests/test_plugin.py
+index 2ae8088..0fa3e2d 100644
+--- a/tests/test_plugin.py
++++ b/tests/test_plugin.py
+@@ -1,11 +1,11 @@
+ # Standard library imports
+ import types
+ from pathlib import Path
++import importlib.metadata
+ from unittest.mock import Mock
+
+ # Third-party imports
+ import black
+-import pkg_resources
+ import pytest
+
+ # Python LSP imports
+@@ -321,13 +321,16 @@ 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_points_pylsp = importlib.metadata.entry_points(name="pylsp")
++ entry_points_black = importlib.metadata.entry_points(name="black")
+
+- assert entry_point is not None
++ assert entry_points_pylsp
++ assert entry_points_black
+
+- module = entry_point.load()
+- assert isinstance(module, types.ModuleType)
++ pylsp_entry = next(iter(entry_points_pylsp)).load()
++ black_entry = next(iter(entry_points_pylsp)).load()
++ assert isinstance(pylsp_entry, (types.ModuleType, types.FunctionType))
++ assert isinstance(black_entry, (types.ModuleType, types.FunctionType))
+
+
+ def test_pylsp_format_crlf_document(
diff --git a/python-lsp-black.spec b/python-lsp-black.spec
index 9c904b6..6d6b5c1 100644
--- a/python-lsp-black.spec
+++ b/python-lsp-black.spec
@@ -24,6 +24,10 @@ Patch: %{forgeurl}/pull/59.patch
# And two more failing since `black >= 24.4.0`
# https://github.com/python-lsp/python-lsp-black/issues/57
Patch: %{forgeurl}/pull/56.patch
+# Migrate test_entry_point from pkg_resources to importlib.metadata
+# https://github.com/python-lsp/python-lsp-black/pull/64
+# Fixes compatibility with setuptools≥82.
+Patch: %{forgeurl}/pull/64.patch
BuildArch: noarch
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-15 10:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-15 10:37 [rpms/python-lsp-black] f44: Patch for pkg_resources removal from setuptools Benjamin A. Beasley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox