public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-vcstool] rawhide: Replace pkg_resources.load_entry_point with importlib.metadata.entry_points
@ 2026-11-08  0:14 Filipe Rosset
  0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-11-08  0:14 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/python-vcstool
Branch : rawhide
Commit : d84c06b72c090268acdee66cf53d2a9f7bd13144
Author : Filipe Rosset <rosset.filipe@gmail.com>
Date   : 2026-11-07T21:13:34-03:00
Stats  : +39/-2 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/python-vcstool/c/d84c06b72c090268acdee66cf53d2a9f7bd13144?branch=rawhide

Log:
Replace pkg_resources.load_entry_point with importlib.metadata.entry_points

---
diff --git a/0001-use-importlib-metadata-instead-of-pkg_resources.patch b/0001-use-importlib-metadata-instead-of-pkg_resources.patch
new file mode 100644
index 0000000..ddc34ad
--- /dev/null
+++ b/0001-use-importlib-metadata-instead-of-pkg_resources.patch
@@ -0,0 +1,37 @@
+Replace pkg_resources.load_entry_point with importlib.metadata.entry_points.
+
+pkg_resources is deprecated and no longer available by default in
+Fedora 45 (setuptools >= 82 no longer ships it as an installed module
+in the base python3 runtime).  importlib.metadata provides the same
+functionality in the standard library since Python 3.8.
+
+Upstream: not yet merged, see https://github.com/dirk-thomas/vcstool/issues/292
+and the proposed fix in https://github.com/dirk-thomas/vcstool/pull/288.
+
+diff --git a/vcstool/commands/help.py b/vcstool/commands/help.py
+--- a/vcstool/commands/help.py
++++ b/vcstool/commands/help.py
+@@ -1,7 +1,7 @@
+ import argparse
+ import sys
+
+-from pkg_resources import load_entry_point
++from importlib.metadata import entry_points
+ from vcstool.clients import vcstool_clients
+ from vcstool.commands import vcstool_commands
+ from vcstool.streams import set_streams
+@@ -86,8 +86,12 @@
+                 file=sys.stderr)
+         return None
+
+-    return load_entry_point(
+-        'vcstool', 'console_scripts', 'vcs-' + commands[0])
++    eps = entry_points()
++    for ep in eps.select(group='console_scripts'):
++        if ep.name == 'vcs-' + commands[0]:
++            return ep.load()
++    print("vcs: entry point 'vcs-%s' not found." % commands[0], file=sys.stderr)
++    return None
+
+
+ def get_parser_with_command_only():

diff --git a/python-vcstool.spec b/python-vcstool.spec
index 8fbd5a8..756f490 100644
--- a/python-vcstool.spec
+++ b/python-vcstool.spec
@@ -12,12 +12,12 @@ Source0:        https://github.com/dirk-thomas/%{srcname}/archive/%{version}/%{s
 
 BuildArch:      noarch
 
+Patch1:         0001-use-importlib-metadata-instead-of-pkg_resources.patch
+
 BuildRequires:  git
 BuildRequires:  python3-devel
-BuildRequires:  python3-pkg_resources
 BuildRequires:  python3-pytest
 BuildRequires:  python3-setuptools
-Requires:       python3-pkg_resources
 
 %description
 Vcstool is a version control system (VCS) tool, designed to make working with

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-08  0:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-08  0:14 [rpms/python-vcstool] rawhide: Replace pkg_resources.load_entry_point with importlib.metadata.entry_points Filipe Rosset

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox