gh-143387: Raise an exception instead of returning None when metadata file is missing. by jaraco · Pull Request #146234 · python/cpython
jaraco
changed the title
Raise an exception instead of returning None when metadata file is missing.
gh-143387: Raise an exception instead of returning None when metadata file is missing.
CuriousLearner added a commit to CuriousLearner/cpython that referenced this pull request
hroncok added a commit to hroncok/rpmlint-1 that referenced this pull request
Python 3.15's importlib.metadata now strictly requires PKG-INFO files in egg-info directories when accessing the requires property. Without it, self.metadata is None and triggers AttributeError when reading d.requires. Although reported as a regression, upstream chose to enforce this requirement rather than handle missing metadata gracefully. python/cpython#143387 In near future, it will raise MetadataNotFound(FileNotFoundError). python/cpython#146234
Conan-Kudo pushed a commit to rpm-software-management/rpmlint that referenced this pull request
Python 3.15's importlib.metadata now strictly requires PKG-INFO files in egg-info directories when accessing the requires property. Without it, self.metadata is None and triggers AttributeError when reading d.requires. Although reported as a regression, upstream chose to enforce this requirement rather than handle missing metadata gracefully. python/cpython#143387 In near future, it will raise MetadataNotFound(FileNotFoundError). python/cpython#146234
KRRT7
mentioned this pull request
2 tasks
frenzymadness added a commit to frenzymadness/poetry that referenced this pull request
In Python 3.15, importlib.metadata raises MetadataNotFound (a FileNotFoundError subclass) when a dist-info directory has no METADATA file. Previously, it returned None. CPython change: python/cpython#146234
radoering pushed a commit to frenzymadness/poetry that referenced this pull request
In Python 3.15, importlib.metadata raises MetadataNotFound (a FileNotFoundError subclass) when a dist-info directory has no METADATA file. Previously, it returned None. CPython change: python/cpython#146234