PEP 658: Served metadata may be non-static (#1972)
This commit is contained in:
parent
5ba83633f6
commit
9873d12f27
23
pep-0658.rst
23
pep-0658.rst
|
@ -1,5 +1,5 @@
|
||||||
PEP: 658
|
PEP: 658
|
||||||
Title: Static Distribution Metadata in the Simple Repository API
|
Title: Serve Distribution Metadata in the Simple Repository API
|
||||||
Author: Tzu-ping Chung <uranusjr@gmail.com>
|
Author: Tzu-ping Chung <uranusjr@gmail.com>
|
||||||
Sponsor: Brett Cannon <brett@python.org>
|
Sponsor: Brett Cannon <brett@python.org>
|
||||||
PEP-Delegate: Donald Stufft <donald@stufft.io>
|
PEP-Delegate: Donald Stufft <donald@stufft.io>
|
||||||
|
@ -48,19 +48,16 @@ inspection.
|
||||||
The metadata file defined by the Core Metadata Specification
|
The metadata file defined by the Core Metadata Specification
|
||||||
[core-metadata]_ will be served directly by repositories since it
|
[core-metadata]_ will be served directly by repositories since it
|
||||||
contains the necessary information for common use cases. The metadata
|
contains the necessary information for common use cases. The metadata
|
||||||
served must be completely static, i.e. identical to the ``METADATA``
|
must only be served for standards-compliant distributions such as
|
||||||
file in the ``.dist-info`` directory [dist-info]_ if the distribution
|
wheels [wheel]_ and sdists [sdist]_, and must be identical to the
|
||||||
is installed. The repository can provide this for any distributions,
|
distribution's canonical metadata file, such as a wheel's ``METADATA``
|
||||||
but it is expected they will only provide them for wheels [wheel]_
|
file in the ``.dist-info`` directory [dist-info]_.
|
||||||
at the current time, since an sdist [sdist]_ does not yet have a way
|
|
||||||
to promise the metadata will stay the same after it is built.
|
|
||||||
|
|
||||||
Since not all distributions have static metadata, an HTML attribute
|
An HTML attribute on the distribution file's anchor link is needed to
|
||||||
on the distribution file's anchor link is needed to indicate whether a
|
indicate whether a client is able to choose the separately served
|
||||||
client is able to choose the separately served metadata file instead.
|
metadata file. The attribute is also used to provide the metadata
|
||||||
The attribute is also used to provide the metadata file's hash, so
|
content's hash for client-side verification. The attribute's absence
|
||||||
clients can verify the file after download. If the attribute is
|
indicates that a separate metadata entry is not available for the
|
||||||
missing from an anchor link, static metadata is not available for the
|
|
||||||
distribution, either because of the distribution's content, or lack of
|
distribution, either because of the distribution's content, or lack of
|
||||||
repository support.
|
repository support.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue