public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/python-plaster] rawhide: Fix compatibility with Python 3.15
Date: Mon, 01 Jun 2026 20:49:26 GMT [thread overview]
Message-ID: <178034696632.1.13739843051942338498.rpms-python-plaster-3cd0bd3b7fa8@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-plaster
Branch : rawhide
Commit : 3cd0bd3b7fa8ba5f732c599504cefee4d1f47666
Author : Tomáš Hrnčiar <thrnciar@redhat.com>
Date : 2026-06-01T17:00:50+02:00
Stats : +35/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-plaster/c/3cd0bd3b7fa8ba5f732c599504cefee4d1f47666?branch=rawhide
Log:
Fix compatibility with Python 3.15
Python 3.15 changed importlib.metadata to raise MetadataNotFound
(a FileNotFoundError subclass) when a distribution has no metadata
file, instead of returning None. This breaks plaster's loader
discovery which iterates all distributions unconditionally.
Assisted-by: Cursor
---
diff --git a/38.patch b/38.patch
new file mode 100644
index 0000000..4bf377d
--- /dev/null
+++ b/38.patch
@@ -0,0 +1,31 @@
+From ab612c84c4a92b32665ee5fa602fca40d340be48 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <tomas.hrnciar@me.com>
+Date: Mon, 1 Jun 2026 16:58:49 +0200
+Subject: [PATCH] Fix compatibility with Python 3.15
+
+Python 3.15 changed importlib.metadata to raise MetadataNotFound
+(a FileNotFoundError subclass) when a distribution has no metadata
+file, instead of returning None. This breaks plaster's loader
+discovery which iterates all distributions unconditionally.
+
+Assisted-by: Cursor
+---
+ src/plaster/loaders.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/plaster/loaders.py b/src/plaster/loaders.py
+index f7b10d1..cdfe97f 100644
+--- a/src/plaster/loaders.py
++++ b/src/plaster/loaders.py
+@@ -176,7 +176,10 @@ def _iter_ep_in_dists(scheme, groups):
+ # See https://github.com/Pylons/plaster/issues/25
+ dups = set()
+ for dist in metadata.distributions():
+- name = dist.metadata["Name"]
++ try:
++ name = dist.metadata["Name"]
++ except FileNotFoundError:
++ continue
+ if name in dups: # pragma: no cover
+ continue
+ dups.add(name)
diff --git a/python-plaster.spec b/python-plaster.spec
index fd0e20c..d281634 100644
--- a/python-plaster.spec
+++ b/python-plaster.spec
@@ -18,6 +18,9 @@ License: MIT
Summary: %{sum}
URL: https://github.com/Pylons/%{srcname}
Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
+# Skip distributions with missing metadata on Python 3.15+
+# MetadataNotFound (FileNotFoundError) is now raised instead of returning None
+Patch: https://github.com/Pylons/plaster/pull/38.patch
BuildRequires: make
BuildRequires: python3-devel
@@ -44,7 +47,7 @@ Summary: %{sum}
%prep
-%autosetup -n %{srcname}-%{version}
+%autosetup -p1 -n %{srcname}-%{version}
%generate_buildrequires
%pyproject_buildrequires -t
reply other threads:[~2026-06-01 20:49 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=178034696632.1.13739843051942338498.rpms-python-plaster-3cd0bd3b7fa8@fedoraproject.org \
--to=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