public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-rpm-generators] rawhide: Properly handle missing METADATA on Python 3.15+
@ 2026-08-15 10:47
0 siblings, 0 replies; only message in thread
From: @ 2026-08-15 10:47 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-rpm-generators
Branch : rawhide
Commit : 9d214678c4b3c976af53671446dc6d19ccac559f
Author : Miro Hrončok <miro@hroncok.cz>
Date : 2026-08-12T21:19:28+02:00
Stats : +6/-1 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/python-rpm-generators/c/9d214678c4b3c976af53671446dc6d19ccac559f?branch=rawhide
Log:
Properly handle missing METADATA on Python 3.15+
See https://github.com/python/cpython/issues/143387
Used LLM to analyze a CI test failure.
Assisted-By: Claude Opus 4.6
---
diff --git a/pythondistdeps.py b/pythondistdeps.py
index d6f5f46..8404292 100755
--- a/pythondistdeps.py
+++ b/pythondistdeps.py
@@ -76,7 +76,12 @@ class Distribution(PathDistribution):
# Check that the initialization went well and metadata are not missing or corrupted
# name is the most important attribute, if it doesn't exist, import failed
- if not self.name or not isinstance(self.name, str):
+ # Python 3.15+ raises MetadataNotFound (FileNotFoundError) instead of returning None
+ try:
+ name = self.name
+ except FileNotFoundError:
+ name = None
+ if not name or not isinstance(name, str):
print("*** PYTHON_METADATA_FAILED_TO_PARSE_ERROR___SEE_STDERR ***")
print('Error: Python metadata at `{}` are missing or corrupted.'.format(path), file=stderr)
exit(65) # os.EX_DATAERR
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-15 10:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-15 10:47 [rpms/python-rpm-generators] rawhide: Properly handle missing METADATA on Python 3.15+
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox