public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Filipe Rosset <rosset.filipe@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-vcstool] f45: Replace pkg_resources.load_entry_point with importlib.metadata.entry_points
Date: Sun, 08 Nov 2026 00:14:56 GMT [thread overview]
Message-ID: <179409689693.1.4816859195867907066.rpms-python-vcstool-d84c06b72c09@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-vcstool
Branch : f45
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=f45
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
reply other threads:[~2026-11-08 0:14 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=179409689693.1.4816859195867907066.rpms-python-vcstool-d84c06b72c09@fedoraproject.org \
--to=rosset.filipe@gmail.com \
--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