We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12bffff commit 8b81efdCopy full SHA for 8b81efd
1 file changed
Misc/NEWS.d/next/Library/2026-03-20-16-17-31.gh-issue-143387.9Waopa.rst
@@ -0,0 +1,7 @@
1
+In importlib.metadata, when a distribution file is corrupt and there is no
2
+metadata file, calls to ``Distribution.metadata()`` (including implicit
3
+calls from other properties like ``.name`` and ``.requires``) will now raise
4
+a ``MetadataNotFound`` Exception. This allows callers to distinguish between
5
+missing metadata and a degenerate (empty) metadata. Previously, if the file
6
+was missing, an empty ``PackageMetadata`` would be returned and would be
7
+indistinguishable from the presence of an empty file.
0 commit comments