diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2023-12-21 20:04:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-21 20:04:05 (GMT) |
commit | 2d91409c690b113493e3e81efc880301d2949f5f (patch) | |
tree | c630499d3863b85e64e77a4c3d5d3db7a7a06a35 /Doc | |
parent | 6b70c3dc5ab2f290fcdbe474bcb7d6fdf29eae4c (diff) | |
download | cpython-2d91409c690b113493e3e81efc880301d2949f5f.zip cpython-2d91409c690b113493e3e81efc880301d2949f5f.tar.gz cpython-2d91409c690b113493e3e81efc880301d2949f5f.tar.bz2 |
gh-113174: Sync with importlib_metadata 7.0 (#113175)
* Sync with importlib_metadata 7.0.0
* Add blurb
* Update docs to reflect changes.
* Link datamodel docs for object.__getitem__
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Add what's new for removed __getattr__
* Link datamodel docs for object.__getitem__
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Add exclamation point, as that seems to be used for other classes.
---------
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/importlib.metadata.rst | 30 | ||||
-rw-r--r-- | Doc/whatsnew/3.13.rst | 4 |
2 files changed, 24 insertions, 10 deletions
diff --git a/Doc/library/importlib.metadata.rst b/Doc/library/importlib.metadata.rst index 1df7d8d..cc4a0da 100644 --- a/Doc/library/importlib.metadata.rst +++ b/Doc/library/importlib.metadata.rst @@ -171,16 +171,18 @@ group. Read `the setuptools docs <https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_ for more information on entry points, their definition, and usage. -*Compatibility Note* - -The "selectable" entry points were introduced in ``importlib_metadata`` -3.6 and Python 3.10. Prior to those changes, ``entry_points`` accepted -no parameters and always returned a dictionary of entry points, keyed -by group. With ``importlib_metadata`` 5.0 and Python 3.12, -``entry_points`` always returns an ``EntryPoints`` object. See -`backports.entry_points_selectable <https://pypi.org/project/backports.entry-points-selectable>`_ -for compatibility options. - +.. versionchanged:: 3.12 + The "selectable" entry points were introduced in ``importlib_metadata`` + 3.6 and Python 3.10. Prior to those changes, ``entry_points`` accepted + no parameters and always returned a dictionary of entry points, keyed + by group. With ``importlib_metadata`` 5.0 and Python 3.12, + ``entry_points`` always returns an ``EntryPoints`` object. See + `backports.entry_points_selectable <https://pypi.org/project/backports.entry-points-selectable>`_ + for compatibility options. + +.. versionchanged:: 3.13 + ``EntryPoint`` objects no longer present a tuple-like interface + (:meth:`~object.__getitem__`). .. _metadata: @@ -342,9 +344,17 @@ instance:: >>> dist.metadata['License'] # doctest: +SKIP 'MIT' +For editable packages, an origin property may present :pep:`610` +metadata:: + + >>> dist.origin.url + 'file:///path/to/wheel-0.32.3.editable-py3-none-any.whl' + The full set of available metadata is not described here. See the `Core metadata specifications <https://packaging.python.org/en/latest/specifications/core-metadata/#core-metadata>`_ for additional details. +.. versionadded:: 3.13 + The ``.origin`` property was added. Distribution Discovery ====================== diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index 2c869cb..7dc02da 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -1001,6 +1001,10 @@ importlib for migration advice. (Contributed by Jason R. Coombs in :gh:`106532`.) +* Remove deprecated :meth:`~object.__getitem__` access for + :class:`!importlib.metadata.EntryPoint` objects. + (Contributed by Jason R. Coombs in :gh:`113175`.) + locale ------ |