Skip to content

Commit 810ea19

Browse files
committed
PEP 808: include METADATA bump
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
1 parent 2201a8c commit 810ea19

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

peps/pep-0808.rst

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PEP: 808
2-
Title: Including static values in dynamic project metadata
2+
Title: Including static values in dynamic metadata
33
Author: Henry Schreiner <henryschreineriii@gmail.com>,
44
Cristian Le <python@lecris.dev>
55
Sponsor: Filipe Laíns <lains@python.org>
@@ -19,7 +19,8 @@ Abstract
1919
This PEP relaxes the constraint on dynamic metadata listed in the ``[project]``
2020
section in ``pyproject.toml``. It is now permitted to define a static portion
2121
of a dynamic metadata field in the ``[project]`` table as long as the field is
22-
a table or array.
22+
a table or array. Likewise, METADATA 2.6 allows mixed static and dynamic
23+
metadata to be specified in source distribution metadata.
2324

2425
This allows users to opt into allowing a backend to extend metadata while still
2526
keeping the static portions of the metadata defined in the standard location in
@@ -254,6 +255,29 @@ and backends can continue to fill it as they choose. However, a backend MUST
254255
ensure that both the SDist and the wheel metadata include the static metadata
255256
portion of the project table.
256257

258+
In METADATA 2.2 to 2.5, there are no constraints on entries listed as
259+
``Dynamic`` (which means a wheel can have different metadata than the SDist for
260+
that field. Now, metadata fields specified in the SDist are guaranteed to also
261+
be in the wheel, even if Dynamic is present. The METADATA version will be
262+
incremented to 2.6. Given this example::
263+
264+
Dynamic: Requires-Dist
265+
Requires-Dist: packaging
266+
267+
Before METADATA 2.6, there are no constraints on a field if it appeared in
268+
``Dynamic``, so the wheel could contain anything; now in 2.6, any values here
269+
are guaranteed to be also present in wheels, so the wheel will contain
270+
``Requires-Dist: packaging``; it may contain more ``Requires-Dist``, but it
271+
will contain at least that one.
272+
273+
This new point will be added to the guidelines:
274+
275+
* If a multiple use field is present in a source distribution and also marked
276+
``Dynamic``, a wheel can add values, but it must include the one(s) present
277+
in the SDist. ``Keywords``, ``Author-Email``, and ``Maintainer-Email`` are
278+
comma-separated lists, and can likewise be extended if present.
279+
280+
257281
Reference Implementation
258282
========================
259283

@@ -273,9 +297,6 @@ metadata.
273297
Backwards Compatibility
274298
=======================
275299

276-
Using metadata from SDists or wheels is unaffected. The METADATA version does
277-
not need to be incremented.
278-
279300
This does not affect any existing ``pyproject.toml`` files, since this was
280301
strictly not allowed before this PEP.
281302

0 commit comments

Comments
 (0)