]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] Add link in the `importlib.metadata.version()` docs (GH-130739) (#130760)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 2 Mar 2025 10:43:06 +0000 (11:43 +0100)
committerGitHub <noreply@github.com>
Sun, 2 Mar 2025 10:43:06 +0000 (10:43 +0000)
Add link in the `importlib.metadata.version()` docs (GH-130739)

Link the specification for the returned data makes it clearer what this is
and what the format of the version string can be.
(cherry picked from commit c71e55869e7bc56b2bd04f3055f810026a66c076)

Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
Doc/library/importlib.metadata.rst

index 4b9b4ca939fc112b1bdbdd42ae586a3b5262ae5a..5dcaabba9f16611961721ee66f68d0b6290c658d 100644 (file)
@@ -266,8 +266,9 @@ Distribution versions
 
 .. function:: version(distribution_name)
 
-   Return the installed distribution package version for the named
-   distribution package.
+   Return the installed distribution package
+   `version <https://packaging.python.org/en/latest/specifications/core-metadata/#version>`__
+   for the named distribution package.
 
    Raises :exc:`PackageNotFoundError` if the named distribution
    package is not installed in the current Python environment.