8000 Hard-code links to packaging docs until intersphinx is supported. Ref… · python/importlib_metadata@5cf4adb · GitHub
[go: up one dir, main page]

Skip to content

Commit 5cf4adb

Browse files
committed
Hard-code links to packaging docs until intersphinx is supported. Ref python/cpython#97785.
1 parent ef172c0 commit 5cf4adb

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

Doc/library/importlib.metadata.rst

Lines 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

@@ -187,7 +187,7 @@ for compatibility options.
187187
Distribution metadata
188188
---------------------
189189

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

@@ -227,7 +227,7 @@ Distribution versions
227227
---------------------
228228

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

233233
>>> version('wheel') # doctest: +SKIP
@@ -240,7 +240,7 @@ Distribution files
240240
------------------
241241

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

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

@@ -300,10 +300,10 @@ function::
300300
Mapping import to distribution packages
301301
---------------------------------------
302302

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

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

324324
>>> from importlib.metadata import distribution # doctest: +SKIP
@@ -339,14 +339,14 @@ instance::
339339
'MIT'
340340

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

344344

345345
Distribution Discovery
346346
======================
347347

348348
By default, this package provides built-in support for discovery of metadata
349-
for file system and zip file :term:`packaging:Distribution Package`\s.
349+
for file system and zip file `Distribution Package <https://packaging.python.org/en/latest/glossary/#term-Distribution-Package>`_\s.
350350
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:
351351

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

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

0 commit comments

Comments
 (0)
0