public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/python-lsp-black] f44: Patch for pkg_resources removal from setuptools
Date: Wed, 15 Jul 2026 10:37:51 GMT	[thread overview]
Message-ID: <178411187116.1.1514741466408919916.rpms-python-lsp-black-d5f849a21e72@fedoraproject.org> (raw)

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
 

                 reply	other threads:[~2026-07-15 10:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178411187116.1.1514741466408919916.rpms-python-lsp-black-d5f849a21e72@fedoraproject.org \
    --to=code@musicinmybrain.net \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox