From 2b2676a3299752193658d2941641a20096a15416 Mon Sep 17 00:00:00 2001 From: Saaket Prakash Date: Sun, 20 Mar 2022 11:26:09 +0530 Subject: [PATCH 1/3] Add note about PackageMetadata protocol in the docs. --- docs/using.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/using.rst b/docs/using.rst index 947d066b..5bb870cb 100644 --- a/docs/using.rst +++ b/docs/using.rst @@ -162,6 +162,12 @@ all the metadata in a JSON-compatible form per PEP 566:: >>> wheel_metadata.json['requires_python'] '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*' +.. note:: + + The actual type of the object returned by ``metadata()`` is an + implementation detail, it should be accessed only through the interface + described by the ``PackageMetadata`` protocol documented here and at + https://importlib-metadata.readthedocs.io/en/latest/api.html#importlib_metadata.PackageMetadata .. _version: From 39510a5b424f84f6c322cbc953a5557fd62193cf Mon Sep 17 00:00:00 2001 From: Saaket Prakash Date: Sun, 20 Mar 2022 11:42:39 +0530 Subject: [PATCH 2/3] Add a See Also: section with link to importlib_metadata docs. --- docs/using.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/using.rst b/docs/using.rst index 5bb870cb..74ef169a 100644 --- a/docs/using.rst +++ b/docs/using.rst @@ -23,6 +23,13 @@ By default, package metadata can live on the file system or in zip archives on anywhere. +.. seealso:: + + https://importlib-metadata.readthedocs.io/ + The documentation for ``importlib_metadata``, which supplies a + backport of ``importlib.metadata``. + + Overview ======== From 5f375a9bd6cbe6ab74f48659173f45377031ca7e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 20 Mar 2022 09:50:14 -0400 Subject: [PATCH 3/3] Avoid comma splice and use a hyperlink to reference the protocol. --- docs/using.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/using.rst b/docs/using.rst index 74ef169a..3bea65d8 100644 --- a/docs/using.rst +++ b/docs/using.rst @@ -172,9 +172,10 @@ all the metadata in a JSON-compatible form per PEP 566:: .. note:: The actual type of the object returned by ``metadata()`` is an - implementation detail, it should be accessed only through the interface - described by the ``PackageMetadata`` protocol documented here and at - https://importlib-metadata.readthedocs.io/en/latest/api.html#importlib_metadata.PackageMetadata + implementation detail and should be accessed only through the interface + described by the + `PackageMetadata protocol `. + .. _version: