]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-143387: Add news blurb for importlib.metadata highlighting the change. (#150169)
authorJason R. Coombs <jaraco@jaraco.com>
Wed, 20 May 2026 19:40:15 +0000 (12:40 -0700)
committerGitHub <noreply@github.com>
Wed, 20 May 2026 19:40:15 +0000 (12:40 -0700)
Doc/whatsnew/3.15.rst

index f88ba4b1877c430bb5ce7e8f3a7ca23dcce161fc..0a7a87d81e53dcccd0eeabd42a0c5f78712a016a 100644 (file)
@@ -1207,6 +1207,19 @@ http.server
   (Contributed by Anton I. Sipos in :gh:`135057`.)
 
 
+importlib.metadata
+------------------
+
+* Previously, when accessing a distribution metadata directory not
+  containing a metadata file, ``metadata()`` and ``Distribution.metadata()``
+  would return an empty ``PackageMetadata`` object as if the file
+  was present but empty. Now, a ``MetadataNotFound`` exception is raised.
+  See `importlib_metadata#493 <https://github.com/python/importlib_metadata/issues/493>`_
+  for background and rationale and and :gh:`143387` for rationale on the
+  compatibility concerns.
+  (Contributed by Jason R. Coombs.)
+
+
 inspect
 -------