Skip to content

Commit d378cfb

Browse files
authored
Merge branch 'main' into patch-1
2 parents 840fea9 + f5d059b commit d378cfb

7 files changed

Lines changed: 325 additions & 116 deletions

File tree

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.7, <0.12.0"]
41+
requires = ["uv_build >= 0.11.21, <0.12.0"]
4242
build-backend = "uv_build"

source/specifications/core-metadata.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,14 +574,14 @@ The format of a requirement string contains from one to four parts:
574574
* An environment marker after a semicolon. This means that the
575575
requirement is only needed in the specified conditions.
576576

577-
See :pep:`508` for full details of the allowed format.
578-
579577
The project names should correspond to names as found
580578
on the `Python Package Index`_.
581579

582580
Version specifiers must follow the rules described in
583581
:doc:`version-specifiers`.
584582

583+
See :ref:`dependency-specifiers` for full details of the allowed format.
584+
585585
Examples::
586586

587587
Requires-Dist: pkginfo
@@ -1071,6 +1071,9 @@ History
10711071
- October 2025: Clarified that ``License-Expression`` applies to the containing
10721072
distribution file and not the project itself.
10731073

1074+
- January 2026: Replaced outdated direct reference to :pep:`508` with a
1075+
reference to :ref:`dependency-specifiers`.
1076+
10741077
----
10751078

10761079
.. [1] reStructuredText markup:

source/specifications/dependency-groups.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ The output is therefore valid ``requirements.txt`` data.
209209
realized_group = []
210210
for item in raw_group:
211211
if isinstance(item, str):
212-
# packaging.requirements.Requirement parsing ensures that this is a valid
213-
# PEP 508 Dependency Specifier
212+
# packaging.requirements.Requirement parsing ensures that this
213+
# is a valid dependency specifier
214214
# raises InvalidRequirement on failure
215215
Requirement(item)
216216
realized_group.append(item)

source/specifications/dependency-specifiers.rst

Lines changed: 272 additions & 93 deletions
Large diffs are not rendered by default.

source/specifications/entry-points.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ Within a value, readers must accept and ignore spaces (including multiple
106106
consecutive spaces) before or after the colon, between the object reference and
107107
the left square bracket, between the extra names and the square brackets and
108108
colons delimiting them, and after the right square bracket. The syntax for
109-
extras is formally specified as part of :pep:`508` (as ``extras``) and
110-
restrictions on values specified in :pep:`685`.
109+
extras is formally specified in :ref:`dependency-specifiers`.
111110
For tools writing the file, it is recommended only to insert a space between the
112111
object reference and the left square bracket.
113112

@@ -166,6 +165,8 @@ History
166165
- October 2017: This specification was written to formalize the existing
167166
entry points feature of setuptools (discussion_).
168167

168+
- January 2026: Replaced outdated direct references to :pep:`508` and
169+
:pep:`685` with a reference to :ref:`dependency-specifiers`.
169170

170171

171172
.. _discussion: https://mail.python.org/pipermail/distutils-sig/2017-October/031585.html

source/specifications/pyproject-toml.rst

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -447,34 +447,57 @@ be ambiguous in the face of ``[project.scripts]`` and
447447

448448

449449
.. _pyproject-toml-dependencies:
450-
.. _pyproject-toml-optional-dependencies:
451450

452-
``dependencies``/``optional-dependencies``
453-
------------------------------------------
451+
``dependencies``
452+
----------------
454453

455-
- TOML_ type: Array of :pep:`508` strings (``dependencies``), and a
456-
table with values of arrays of :pep:`508` strings
457-
(``optional-dependencies``)
454+
- TOML_ type: Array of :ref:`dependency specifier <dependency-specifiers>`
455+
strings (``dependencies``)
458456
- Corresponding :ref:`core metadata <core-metadata>` field:
459-
:ref:`Requires-Dist <core-metadata-requires-dist>` and
460-
:ref:`Provides-Extra <core-metadata-provides-extra>`
457+
:ref:`Requires-Dist <core-metadata-requires-dist>`
461458

462-
The (optional) dependencies of the project.
459+
``dependencies`` lists the expected dependencies of the project as an
460+
array of strings.
463461

464-
For ``dependencies``, it is a key whose value is an array of strings.
465462
Each string represents a dependency of the project and MUST be
466-
formatted as a valid :pep:`508` string. Each string maps directly to
467-
a :ref:`Requires-Dist <core-metadata-requires-dist>` entry.
463+
formatted as a valid :ref:`dependency specifier <dependency-specifiers>`.
464+
465+
Each string maps directly to a
466+
:ref:`Requires-Dist <core-metadata-requires-dist>` entry.
467+
468+
Dependencies listed in this array are always considered
469+
for installation, but may still contain environment markers that cause them
470+
to be skipped in some environments.
471+
472+
473+
.. _pyproject-toml-optional-dependencies:
474+
475+
``optional-dependencies``
476+
-------------------------
477+
478+
- TOML_ type: table with string keys mapping to arrays of
479+
:ref:`dependency specifier <dependency-specifiers>` strings (``optional-dependencies``)
480+
- Corresponding :ref:`core metadata <core-metadata>` fields:
481+
:ref:`Requires-Dist <core-metadata-requires-dist>` and
482+
:ref:`Provides-Extra <core-metadata-provides-extra>`
483+
484+
``optional-dependencies`` is a table where each key specifies
485+
an extra and whose value is an array of strings using the same format as the
486+
``dependencies`` array (the strings in the
487+
arrays must be valid :ref:`dependency specifiers <dependency-specifiers>`).
468488

469-
For ``optional-dependencies``, it is a table where each key specifies
470-
an extra and whose value is an array of strings. The strings of the
471-
arrays must be valid :pep:`508` strings. The keys MUST be valid values
489+
The keys MUST be valid values
472490
for :ref:`Provides-Extra <core-metadata-provides-extra>`. Each value
473491
in the array thus becomes a corresponding
474492
:ref:`Requires-Dist <core-metadata-requires-dist>` entry for the
475493
matching :ref:`Provides-Extra <core-metadata-provides-extra>`
476494
metadata.
477495

496+
The optionality of these dependencies is recorded by modifying the environment
497+
marker clause on the related ``Requires-Dist`` entries to check the extra name.
498+
Optional dependencies are thus only considered for installation if installation
499+
if the associated extra name is requested.
500+
478501

479502
.. _pyproject-toml-import-names:
480503

@@ -647,4 +670,7 @@ History
647670
- October 2025: The ``import-names`` and ``import-namespaces`` keys were added
648671
through :pep:`794`.
649672

673+
- January 2026: Replaced outdated direct reference to :pep:`508` with a
674+
reference to :ref:`dependency-specifiers`.
675+
650676
.. _TOML: https://toml.io

source/specifications/source-distribution-format.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ at their respective paths relative to the root directory of the sdist
7474
No other content of a sdist is required or defined. Build systems can store
7575
whatever information they need in the sdist to build the project.
7676

77-
The tarball should use the modern POSIX.1-2001 pax tar format, which specifies
77+
The tarball must use the modern POSIX.1-2001 pax tar format, which specifies
7878
UTF-8 based file names. In particular, source distribution files must be readable
7979
using the standard library tarfile module with the open flag 'r:gz'.
8080

0 commit comments

Comments
 (0)