Skip to content

Commit e99c7fb

Browse files
committed
add versionadded for name
1 parent 21a7a59 commit e99c7fb

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

Doc/library/importlib.metadata.rst

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -465,9 +465,7 @@ The same applies for :func:`entry_points` and :func:`files`.
465465
:class:`!DistributionFinder.Context`.
466466

467467
.. attribute:: metadata
468-
.. attribute:: name
469-
.. attribute:: requires
470-
.. attribute:: version
468+
:type: PackageMetadata
471469

472470
There are all kinds of additional metadata available on :class:`!Distribution`
473471
instances as a :class:`PackageMetadata` instance::
@@ -480,6 +478,19 @@ The same applies for :func:`entry_points` and :func:`files`.
480478
The full set of available metadata is not described here.
481479
See the PyPA `Core metadata specification <https://packaging.python.org/en/latest/specifications/core-metadata/#core-metadata>`_ for additional details.
482480

481+
.. attribute:: name
482+
:type: str
483+
.. attribute:: requires
484+
:type: list[str]
485+
.. attribute:: version
486+
:type: str
487+
488+
A few metadata fields are also available as shortcut properties.
489+
490+
.. versionadded:: 3.10
491+
492+
The ``name`` shortcut was added.
493+
483494
.. attribute:: origin
484495

485496
For editable packages, an ``origin`` property may present :pep:`610`
@@ -494,12 +505,14 @@ The same applies for :func:`entry_points` and :func:`files`.
494505
.. versionadded:: 3.13
495506

496507
.. attribute:: entry_points
508+
:type: EntryPoints
497509

498-
The :class:`!EntryPoints` provided by this distribution package.
510+
The entry points provided by this distribution package.
499511

500512
.. attribute:: files
513+
:type: list[PackagePath] | None
501514

502-
A sequence of :class:`!PackagePath`\s contained in this distribution package.
515+
All files contained in this distribution package.
503516
Like :func:`files`, this returns :const:`None` if there are no records.
504517

505518
The following two abstract methods need to be implemented when implementing-custom-providers_:

0 commit comments

Comments
 (0)