diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-12-31 17:56:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-31 17:56:43 (GMT) |
commit | dfdca85dfa64e72df385b3a486f85b773fc0f135 (patch) | |
tree | f035325cbc5e8787d8e7824bdd7ad4edbe42e795 /Doc | |
parent | f4936ad1c4d0ae1948e428aeddc7d3096252dae4 (diff) | |
download | cpython-dfdca85dfa64e72df385b3a486f85b773fc0f135.zip cpython-dfdca85dfa64e72df385b3a486f85b773fc0f135.tar.gz cpython-dfdca85dfa64e72df385b3a486f85b773fc0f135.tar.bz2 |
bpo-42382: In importlib.metadata, `EntryPoint` objects now expose `dist` (#23758)
* bpo-42382: In importlib.metadata, `EntryPoint` objects now expose a `.dist` object referencing the `Distribution` when constructed from a `Distribution`.
Also, sync importlib_metadata 3.3:
- Add support for package discovery under package normalization rules.
- The object returned by `metadata()` now has a formally-defined protocol called `PackageMetadata` with declared support for the `.get_all()` method.
* Add blurb
* Remove latent footnote.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/importlib.metadata.rst | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Doc/library/importlib.metadata.rst b/Doc/library/importlib.metadata.rst index 21da143..858ed0a 100644 --- a/Doc/library/importlib.metadata.rst +++ b/Doc/library/importlib.metadata.rst @@ -115,8 +115,9 @@ Every distribution includes some metadata, which you can extract using the >>> wheel_metadata = metadata('wheel') # doctest: +SKIP -The keys of the returned data structure [#f1]_ name the metadata keywords, and -their values are returned unparsed from the distribution metadata:: +The keys of the returned data structure, a ``PackageMetadata``, +name the metadata keywords, and +the values are returned unparsed from the distribution metadata:: >>> wheel_metadata['Requires-Python'] # doctest: +SKIP '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*' @@ -259,9 +260,3 @@ a custom finder, return instances of this derived ``Distribution`` in the .. rubric:: Footnotes - -.. [#f1] Technically, the returned distribution metadata object is an - :class:`email.message.EmailMessage` - instance, but this is an implementation detail, and not part of the - stable API. You should only use dictionary-like methods and syntax - to access the metadata contents. |