Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e8d8f9d

Browse filesBrowse files
committed
Hard-code links to packaging docs until intersphinx is supported. Ref python/cpython#97785.
1 parent 386479b commit e8d8f9d
Copy full SHA for e8d8f9d

File tree

1 file changed

+14
-14
lines changed
Filter options

1 file changed

+14
-14
lines changed

‎Doc/library/importlib.metadata.rst

Copy file name to clipboardExpand all lines: Doc/library/importlib.metadata.rst
+14-14Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
**Source code:** :source:`Lib/importlib/metadata/__init__.py`
1515

1616
``importlib_metadata`` is a library that provides access to
17-
the metadata of an installed :term:`packaging:Distribution Package`,
17+
the metadata of an installed `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_,
1818
such as its entry points
19-
or its top-level names (:term:`packaging:Import Package`\s, modules, if any).
19+
or its top-level names (`Import Package <https://packaging.python.org/en/latest/glossary/#term-Import-Package>`_\s, modules, if any).
2020
Built in part on Python's import system, this library
2121
intends to replace similar functionality in the `entry point
2222
API`_ and `metadata API`_ of ``pkg_resources``. Along with
@@ -29,7 +29,7 @@ installed into Python's ``site-packages`` directory via tools such as
2929
`pip <https://pypi.org/project/pip/>`_.
3030
Specifically, it works with distributions with discoverable
3131
``dist-info`` or ``egg-info`` directories,
32-
and metadata defined by the :ref:`packaging:core-metadata`.
32+
and metadata defined by the `Core metadata specifications <https://packaging.python.org/en/latest/specifications/core-metadata/#core-metadata>`_.
3333

3434
.. important::
3535

@@ -67,7 +67,7 @@ Overview
6767
========
6868

6969
Let's say you wanted to get the version string for a
70-
:term:`packaging:Distribution Package` you've installed
70+
`Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ you've installed
7171
using ``pip``. We start by creating a virtual environment and installing
7272
something into it:
7373

@@ -188,7 +188,7 @@ interface to retrieve entry points by group.
188188
Distribution metadata
189189
---------------------
190190

191-
Every :term:`packaging:Distribution Package` includes some metadata,
191+
Every `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ includes some metadata,
192192
which you can extract using the
193193
``metadata()`` function::
194194

@@ -228,7 +228,7 @@ Distribution versions
228228
---------------------
229229

230230
The ``version()`` function is the quickest way to get a
231-
:term:`packaging:Distribution Package`'s version
231+
`Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_'s version
232232
number, as a string::
233233

234234
>>> version('wheel') # doctest: +SKIP
@@ -241,7 +241,7 @@ Distribution files
241241
------------------
242242

243243
You can also get the full set of files contained within a distribution. The
244-
``files()`` function takes a :term:`packaging:Distribution Package` name
244+
``files()`` function takes a `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ name
245245
and returns all of the
246246
files installed by this distribution. Each file object returned is a
247247
``PackagePath``, a :class:`pathlib.PurePath` derived object with additional ``dist``,
@@ -287,7 +287,7 @@ distribution is not known to have the metadata present.
287287
Distribution requirements
288288
-------------------------
289289

290-
To get the full set of requirements for a :term:`packaging:Distribution Package`,
290+
To get the full set of requirements for a `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_,
291291
use the ``requires()``
292292
function::
293293

@@ -301,10 +301,10 @@ function::
301301
Mapping import to distribution packages
302302
---------------------------------------
303303

304-
A convenience method to resolve the :term:`packaging:Distribution Package`
304+
A convenience method to resolve the `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_
305305
name (or names, in the case of a namespace package)
306306
that provide each importable top-level
307-
Python module or :term:`packaging:Import Package`::
307+
Python module or `Import Package <https://packaging.python.org/en/latest/glossary/#term-Import-Package>`_::
308308

309309
>>> packages_distributions()
310310
{'importlib_metadata': ['importlib-metadata'], 'yaml': ['PyYAML'], 'jaraco': ['jaraco.classes', 'jaraco.functools'], ...}
@@ -319,7 +319,7 @@ Distributions
319319
While the above API is the most common and convenient usage, you can get all
320320
of that information from the ``Distribution`` class. A ``Distribution`` is an
321321
abstract object that represents the metadata for
322-
a Python :term:`packaging:Distribution Package`. You can
322+
a Python `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_. You can
323323
get the ``Distribution`` instance::
324324

325325
>>> from importlib.metadata import distribution # doctest: +SKIP
@@ -340,14 +340,14 @@ instance::
340340
'MIT'
341341

342342
The full set of available metadata is not described here.
343-
See the :ref:`packaging:core-metadata` for additional details.
343+
See the `Core metadata specifications <https://packaging.python.org/en/latest/specifications/core-metadata/#core-metadata>`_ for additional details.
344344

345345

346346
Distribution Discovery
347347
======================
348348

349349
By default, this package provides built-in support for discovery of metadata
350-
for file system and zip file :term:`packaging:Distribution Package`\s.
350+
for file system and zip file `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_\s.
351351
This metadata finder search defaults to ``sys.path``, but varies slightly in how it interprets those values from how other import machinery does. In particular:
352352

353353
- ``importlib.metadata`` does not honor :class:`bytes` objects on ``sys.path``.
@@ -357,7 +357,7 @@ This metadata finder search defaults to ``sys.path``, but varies slightly in how
357357
Extending the search algorithm
358358
==============================
359359

360-
Because :term:`packaging:Distribution Package` metadata
360+
Because `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_ metadata
361361
is not available through :data:`sys.path` searches, or
362362
package loaders directly,
363363
the metadata for a distribution is found through import

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.