8000 Update docs to reflect changes. · python/cpython@aa23e5a · GitHub
[go: up one dir, main page]

Skip to content

Commit aa23e5a

Browse files
committed
Update docs to reflect changes.
1 parent 9f77bda commit aa23e5a

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

Doc/library/importlib.metadata.rst

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -171,16 +171,18 @@ group. Read `the setuptools docs
171171
<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_
172172
for more information on entry points, their definition, and usage.
173173

174-
*Compatibility Note*
175-
176-
The "selectable" entry points were introduced in ``importlib_metadata``
177-
3.6 and Python 3.10. Prior to those changes, ``entry_points`` accepted
178-
no parameters and always returned a dictionary of entry points, keyed
179-
by group. With ``importlib_metadata`` 5.0 and Python 3.12,
180-
``entry_points`` always returns an ``EntryPoints`` object. See
181-
`backports.entry_points_selectable <https://pypi.org/project/backports.entry-points-selectable>`_
182-
for compatibility options.
183-
174+
.. versionchanged:: 3.12
175+
The "selectable" entry points were introduced in ``importlib_metadata``
176+
3.6 and Python 3.10. Prior to those changes, ``entry_points`` accepted
177+
no parameters and always returned a dictionary of entry points, keyed
178+
by group. With ``importlib_metadata`` 5.0 and Python 3.12,
179+
``entry_points`` always returns an ``EntryPoints`` object. See
180+
`backports.entry_points_selectable <https://pypi.org/project/backports.entry-points-selectable>`_
181+
for compatibility options.
182+
183+
.. versionchanged:: 3.13
184+
``EntryPoint`` objects no longer present a tuple-like interface
185+
(``__getitem__``).
184186

185187
.. _metadata:
186188

@@ -342,9 +344,17 @@ instance::
342344
>>> dist.metadata['License'] # doctest: +SKIP
343345
'MIT'
344346

347+
For editable packages, an origin property may present :pep:`610`
348+
metadata::
349+
350+
>>> dist.origin.url
351+
'file:///path/to/wheel-0.32.3.editable-py3-none-any.whl'
352+
345353
The full set of available metadata is not described here.
346354
See the `Core metadata specifications <https://packaging.python.org/en/latest/specifications/core-metadata/#core-metadata>`_ for additional details.
347355

356+
.. versionadded:: 3.13
357+
The ``.origin`` property was added.
348358

349359
Distribution Discovery
350360
======================

0 commit comments

Comments
 (0)
0