From 4cd4b8bd1ab79f0f99a8b259e7b3a6c52351c256 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 5 Mar 2026 17:02:39 -0500 Subject: [PATCH 1/2] PEP 808: include METADATA bump Signed-off-by: Henry Schreiner --- peps/pep-0808.rst | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/peps/pep-0808.rst b/peps/pep-0808.rst index 19ce00c5ecb..1f5bd3f2578 100644 --- a/peps/pep-0808.rst +++ b/peps/pep-0808.rst @@ -1,5 +1,5 @@ PEP: 808 -Title: Including static values in dynamic project metadata +Title: Including static values in dynamic metadata Author: Henry Schreiner , Cristian Le Sponsor: Filipe LaĆ­ns @@ -19,7 +19,8 @@ Abstract This PEP relaxes the constraint on dynamic metadata listed in the ``[project]`` section in ``pyproject.toml``. It is now permitted to define a static portion of a dynamic metadata field in the ``[project]`` table as long as the field is -a table or array. +a table or array. Likewise, METADATA 2.6 allows mixed static and dynamic +metadata to be specified in source distribution metadata. This allows users to opt into allowing a backend to extend metadata while still 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 ensure that both the SDist and the wheel metadata include the static metadata portion of the project table. +In METADATA 2.2 to 2.5, there are no constraints on entries listed as +``Dynamic`` (which means a wheel can have different metadata than the SDist for +that field. Now, metadata fields specified in the SDist are guaranteed to also +be in the wheel, even if Dynamic is present. The METADATA version will be +incremented to 2.6. Given this example:: + + Dynamic: Requires-Dist + Requires-Dist: packaging + +Before METADATA 2.6, there are no constraints on a field if it appeared in +``Dynamic``, so the wheel could contain anything; now in 2.6, any values here +are guaranteed to be also present in wheels, so the wheel will contain +``Requires-Dist: packaging``; it may contain more ``Requires-Dist``, but it +will contain at least that one. + +This new point will be added to the guidelines: + +* If a multiple use field is present in a source distribution and also marked + ``Dynamic``, a wheel can add values, but it must include the one(s) present + in the SDist. ``Keywords``, ``Author-Email``, and ``Maintainer-Email`` are + comma-separated lists, and can likewise be extended if present. + + Reference Implementation ======================== @@ -273,9 +297,6 @@ metadata. Backwards Compatibility ======================= -Using metadata from SDists or wheels is unaffected. The METADATA version does -not need to be incremented. - This does not affect any existing ``pyproject.toml`` files, since this was strictly not allowed before this PEP. From ef6eff0027a03c9f309c93e7050be55fc81918d2 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Sat, 14 Mar 2026 13:21:56 -0400 Subject: [PATCH 2/2] Update pep-0808.rst Co-authored-by: Carol Willing --- peps/pep-0808.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peps/pep-0808.rst b/peps/pep-0808.rst index 1f5bd3f2578..a7598fd0673 100644 --- a/peps/pep-0808.rst +++ b/peps/pep-0808.rst @@ -257,7 +257,7 @@ portion of the project table. In METADATA 2.2 to 2.5, there are no constraints on entries listed as ``Dynamic`` (which means a wheel can have different metadata than the SDist for -that field. Now, metadata fields specified in the SDist are guaranteed to also +that field). Now, metadata fields specified in the SDist are guaranteed to also be in the wheel, even if Dynamic is present. The METADATA version will be incremented to 2.6. Given this example::