You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Doc/library/importlib.metadata.rst
+18-5Lines changed: 18 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -465,9 +465,7 @@ The same applies for :func:`entry_points` and :func:`files`.
465
465
:class:`!DistributionFinder.Context`.
466
466
467
467
.. attribute:: metadata
468
-
.. attribute:: name
469
-
.. attribute:: requires
470
-
.. attribute:: version
468
+
:type: PackageMetadata
471
469
472
470
There are all kinds of additional metadata available on :class:`!Distribution`
473
471
instances as a :class:`PackageMetadata` instance::
@@ -480,6 +478,19 @@ The same applies for :func:`entry_points` and :func:`files`.
480
478
The full set of available metadata is not described here.
481
479
See the PyPA `Core metadata specification <https://packaging.python.org/en/latest/specifications/core-metadata/#core-metadata>`_ for additional details.
482
480
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
+
483
494
.. attribute:: origin
484
495
485
496
For editable packages, an ``origin`` property may present :pep:`610`
@@ -494,12 +505,14 @@ The same applies for :func:`entry_points` and :func:`files`.
494
505
.. versionadded:: 3.13
495
506
496
507
.. attribute:: entry_points
508
+
:type: EntryPoints
497
509
498
-
The :class:`!EntryPoints` provided by this distribution package.
510
+
The entry points provided by this distribution package.
499
511
500
512
.. attribute:: files
513
+
:type: list[PackagePath] | None
501
514
502
-
A sequence of :class:`!PackagePath`\s contained in this distribution package.
515
+
All files contained in this distribution package.
503
516
Like :func:`files`, this returns :const:`None` if there are no records.
504
517
505
518
The following two abstract methods need to be implemented when implementing-custom-providers_:
0 commit comments