Skip to content

Commit 3b98cee

Browse files
authored
Merge branch 'main' into main
2 parents 84ea0ce + f227f5c commit 3b98cee

10 files changed

Lines changed: 82 additions & 12 deletions

‎.pre-commit-config.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ repos:
3939
- repo: https://github.com/astral-sh/ruff-pre-commit
4040
rev: v0.14.10
4141
hooks:
42-
- id: ruff
42+
- id: ruff-check
4343
- id: ruff-format

‎source/conf.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@
148148
# Ignore while StackOverflow is blocking GitHub CI. Ref:
149149
# https://github.com/pypa/packaging.python.org/pull/1474
150150
r"https://stackoverflow\.com/.*",
151+
# Cloudflare challenge blocks automated link checking.
152+
r"https://clickpy\.clickhouse\.com/$",
151153
r"https://pyscaffold\.org/.*",
152154
r"https://anaconda\.org",
153155
r"https://www\.cisa\.gov/sbom",

‎source/guides/dropping-older-python-versions.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ such as at least Python 3.9. Or, at least Python 3.7 and beyond, skipping the 3.
8989
If using the :ref:`setuptools` build backend, consult the `dependency-management`_ documentation for more options.
9090

9191
.. caution::
92-
Avoid adding upper bounds to the version ranges, e. g. ``">= 3.8, < 3.10"``. Doing so can cause different errors
92+
Avoid adding upper bounds to the version ranges, e.g. ``">= 3.8, < 3.10"``. Doing so can cause different errors
9393
and version conflicts. See the `discourse-discussion`_ for more information.
9494

9595
3. Validating the Metadata before publishing

‎source/overview.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ A similar model involves installing an alternative Python
279279
distribution, but does not support arbitrary operating system-level
280280
packages:
281281

282-
* `ActiveState ActivePython <https://www.activestate.com/products/python/>`_
282+
* `ActiveState ActivePython <https://www.activestate.com/platform/supported-languages/python>`_
283283
* `WinPython <http://winpython.github.io/>`_
284284

285285
.. _bringing-your-own-python:

‎source/shared/build-backend-tabs.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@
3838
.. code-block:: toml
3939
4040
[build-system]
41-
requires = ["uv_build >= 0.11.23, <0.12.0"]
41+
requires = ["uv_build >= 0.12.1, <0.13.0"]
4242
build-backend = "uv_build"

‎source/specifications/binary-distribution-format.rst‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ fields is specified, the :file:`.dist-info/` directory MUST contain a
276276
``License-File`` fields in the :file:`METADATA` file at their respective paths
277277
relative to the :file:`licenses/` directory.
278278

279+
.. _dist-info-sbom-directory:
280+
279281
The :file:`.dist-info/sboms/` directory
280282
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
281283

‎source/specifications/core-metadata.rst‎

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Core metadata specifications
77
============================
88

9-
This page describes version 2.5, approved in September 2025.
9+
This page describes version 2.6, approved in May 2026.
1010

1111
Fields defined in the following specification should be considered valid,
1212
complete and not subject to change. The required fields are:
@@ -50,7 +50,7 @@ Metadata-Version
5050
.. versionadded:: 1.0
5151

5252
Version of the file format; legal values are "1.0", "1.1", "1.2", "2.1",
53-
"2.2", "2.3", "2.4", and "2.5".
53+
"2.2", "2.3", "2.4", "2.5", and "2.6".
5454

5555
Automated tools consuming metadata SHOULD warn if ``metadata-version`` is
5656
greater than the highest version they support, and MUST fail if
@@ -109,6 +109,10 @@ Dynamic (multiple use)
109109
======================
110110

111111
.. versionadded:: 2.2
112+
.. versionchanged:: 2.6
113+
A multiple use field that is present in the sdist and also marked
114+
``Dynamic`` may only be appended to in a wheel built from the sdist.
115+
Previously any field listed in Dynamic was ignored in an sdist.
112116

113117
A string containing the name of another core metadata field. The field
114118
names ``Name``, ``Version``, and ``Metadata-Version`` may not be specified
@@ -121,8 +125,12 @@ rules apply:
121125
in any wheel built from the sdist MUST match the value in the sdist.
122126
If the field is not in the sdist, and not marked as ``Dynamic``, then
123127
it MUST NOT be present in the wheel.
124-
2. If a field is marked as ``Dynamic``, it may contain any valid value in
125-
a wheel built from the sdist (including not being present at all).
128+
2. If a single-use field is marked as ``Dynamic``, it may contain any valid
129+
value in a wheel built from the sdist (including not being present at all).
130+
3. If a multiple use field is present in the sdist and also marked ``Dynamic``,
131+
then a wheel built from the sdist MUST include the value(s) present in the
132+
sdist. The wheel MAY add further values, but it MUST NOT remove, reorder, or
133+
modify the values present in the sdist.
126134

127135
If the sdist metadata version is older than version 2.2, then all fields should
128136
be treated as if they were specified with ``Dynamic`` (i.e. there are no special
@@ -1074,6 +1082,12 @@ History
10741082
- January 2026: Replaced outdated direct reference to :pep:`508` with a
10751083
reference to :ref:`dependency-specifiers`.
10761084

1085+
- May 2026: Core metadata 2.6 was approved through :pep:`808`.
1086+
1087+
- Allowed a multiple use field marked ``Dynamic`` to be appended to in a
1088+
wheel built from a sdist, requiring the wheel to preserve the value(s)
1089+
present in the sdist.
1090+
10771091
----
10781092

10791093
.. [1] reStructuredText markup:

‎source/specifications/dependency-groups.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ The output is therefore valid ``requirements.txt`` data.
232232
233233
def resolve(dependency_groups: dict, group: str) -> list[str]:
234234
if not isinstance(dependency_groups, dict):
235-
raise TypeError("Dependency Groups table is not a dict")
235+
raise TypeError("Dependency groups table is not a dict")
236236
if not isinstance(group, str):
237237
raise TypeError("Dependency group name is not a str")
238238
return _resolve_dependency_group(dependency_groups, group)
@@ -244,7 +244,7 @@ The output is therefore valid ``requirements.txt`` data.
244244
245245
dependency_groups_raw = pyproject["dependency-groups"]
246246
dependency_groups = _normalize_group_names(dependency_groups_raw)
247-
print("\n".join(resolve(pyproject["dependency-groups"], sys.argv[1])))
247+
print("\n".join(resolve(dependency_groups, sys.argv[1])))
248248
249249
History
250250
=======

‎source/specifications/inline-script-metadata.rst‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,17 @@ and the regular expression, the text specification takes precedence.
7070
Tools MUST NOT read from metadata blocks with types that have not been
7171
standardized by this specification.
7272

73+
Note that the specification only requires that *top-level* comment blocks are
74+
recognised as containing metadata. However, parsing Python code is non-trivial,
75+
and therefore:
76+
77+
* Tools MAY choose to do a simple textual scan, rather than a full Python parse.
78+
* As a result of the previous point, the behaviour of scripts that contain data
79+
that looks like metadata within another Python construct such as a multi-line
80+
string is tool-dependent and should not be relied on.
81+
* The canonical regular expression provided above is an example of an
82+
implementation that does a simple textual scan.
83+
7384
script type
7485
-----------
7586

‎source/specifications/pyproject-toml.rst‎

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,13 @@ by the metadata). Dynamic metadata is listed via the ``dynamic`` key
114114
(defined later in this specification) and represents metadata that a
115115
tool will later provide.
116116

117+
A key whose value is a list or a table of arbitrary entries MAY be
118+
specified statically *and* listed in ``dynamic`` at the same time. In
119+
that case the entries given statically are fixed and a build back-end
120+
MAY only *append* further entries to them; the back-end MUST NOT
121+
remove, reorder, or modify any statically-specified entries. See the
122+
:ref:`dynamic <pyproject-toml-dynamic>` key for details.
123+
117124
The lack of a ``[project]`` table implicitly means the :term:`build backend <Build Backend>`
118125
will dynamically provide all keys.
119126

@@ -624,8 +631,9 @@ provided via tooling later on.
624631
field as "Optional", the metadata MAY list it in ``dynamic`` if the
625632
expectation is a build back-end will provide the data for the key
626633
later.
627-
- Build back-ends MUST raise an error if the metadata specifies a
628-
key statically as well as being listed in ``dynamic``.
634+
- Build back-ends MUST raise an error if the metadata specifies a key
635+
statically as well as being listed in ``dynamic``, *unless* the key
636+
represents a list or arbitrary table that can be extended, listed below.
629637
- If the metadata does not list a key in ``dynamic``, then a build
630638
back-end CANNOT fill in the requisite metadata on behalf of the user
631639
(i.e. ``dynamic`` is the only way to allow a tool to fill in
@@ -635,6 +643,35 @@ provided via tooling later on.
635643
the data for it (omitting the data, if determined to be the accurate
636644
value, is acceptable).
637645

646+
A key whose value is a list or a table of arbitrary entries MAY be
647+
specified statically and listed in ``dynamic`` simultaneously. The
648+
keys fitting that description are:
649+
650+
- ``authors``
651+
- ``classifiers``
652+
- ``dependencies``
653+
- ``entry-points``
654+
- ``gui-scripts``
655+
- ``import-names``
656+
- ``import-namespaces``
657+
- ``keywords``
658+
- ``license-files``
659+
- ``maintainers``
660+
- ``optional-dependencies``
661+
- ``scripts``
662+
- ``urls``
663+
664+
When such a key is specified both statically and listed in
665+
``dynamic``:
666+
667+
- A build back-end MAY only *append* entries to the value; it MUST NOT
668+
remove, reorder, or modify any statically-specified entries. For
669+
tables (such as ``optional-dependencies`` or ``entry-points``) this
670+
means a back-end MAY add new keys and MAY append to the values of
671+
existing keys (in the case of a list), but MUST NOT change or remove the
672+
entries given statically.
673+
- A build back-end SHOULD raise an error if a key is listed in
674+
``dynamic`` and it does not support extending that key.
638675

639676

640677
.. _pyproject-tool-table:
@@ -678,6 +715,10 @@ History
678715
- January 2026: Replaced outdated direct reference to :pep:`508` with a
679716
reference to :ref:`dependency-specifiers`.
680717

718+
- May 2026: Allowed list and table keys to be specified statically as well
719+
as listed in ``dynamic``, with build back-ends only able to append
720+
entries, through :pep:`808`.
721+
681722
- August 2026: Document self-referential extra as a supported feature by many
682723
modern package managers of Python.
683724

0 commit comments

Comments
 (0)