From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 20 May 2026 19:48:04 +0000 (+0200) Subject: [3.15] gh-143387: Add news blurb for importlib.metadata highlighting the change.... X-Git-Tag: v3.15.0b2~107 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=fb6984f305db00aa2dad623cf7b1236eddbd0387;p=thirdparty%2FPython%2Fcpython.git [3.15] gh-143387: Add news blurb for importlib.metadata highlighting the change. (GH-150169) (#150171) gh-143387: Add news blurb for importlib.metadata highlighting the change. (GH-150169) (cherry picked from commit cb3b4b98d8d141c9de0462a0fa7e227a2104c1c7) Co-authored-by: Jason R. Coombs --- diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 9bef7aa61d23..1670f033401f 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -1208,6 +1208,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 `_ + for background and rationale and and :gh:`143387` for rationale on the + compatibility concerns. + (Contributed by Jason R. Coombs.) + + inspect -------