Skip to content

Commit 7b6daa4

Browse files
authored
Merge branch 'main' into konsti/no-negative-extras
2 parents 3200c49 + 457e74f commit 7b6daa4

11 files changed

Lines changed: 53 additions & 10 deletions

‎.pre-commit-config.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repos:
1515
- id: trailing-whitespace
1616

1717
- repo: https://github.com/codespell-project/codespell
18-
rev: v2.4.1
18+
rev: v2.4.2
1919
hooks:
2020
- id: codespell
2121
args: ["-L", "ned,ist,oder", "--skip", "*.po"]
@@ -37,7 +37,7 @@ repos:
3737
- id: rst-inline-touching-normal
3838

3939
- repo: https://github.com/astral-sh/ruff-pre-commit
40-
rev: v0.14.10
40+
rev: v0.15.20
4141
hooks:
4242
- id: ruff-check
4343
- id: ruff-format

‎source/conf.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@
230230
"python": ("https://docs.python.org/3", None),
231231
"python-guide": ("https://docs.python-guide.org", None),
232232
"setuptools": ("https://setuptools.pypa.io/en/latest/", None),
233+
"setuptools-scm": ("https://setuptools-scm.rtfd.io/latest", None),
233234
"spack": ("https://spack.readthedocs.io/en/latest/", None),
234235
"sphinx": ("https://www.sphinx-doc.org/en/master", None),
235236
"tox": ("https://tox.wiki/en/latest/", None),

‎source/discussions/setup-py-deprecated.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ A possible replacement solution (among others) is to rely on setuptools-scm_:
115115

116116
* ``python -m setuptools_scm``
117117

118-
.. _setuptools-scm: https://setuptools-scm.readthedocs.io/en/latest/usage#as-cli-tool
118+
.. _setuptools-scm: https://setuptools-scm.readthedocs.io/latest/usage/#as-cli-tool
119119

120120

121121
Remaining commands

‎source/discussions/single-source-version.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ The following are links to some build system's documentation for handling versio
5959

6060
* `Setuptools <https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#dynamic-metadata>`_
6161

62-
- `setuptools_scm <https://setuptools-scm.readthedocs.io/en/latest/>`_
62+
- `setuptools_scm <https://setuptools-scm.rtfd.io/latest>`_

‎source/guides/creating-and-discovering-plugins.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Now the module of your choice can be imported by executing
165165
section on :doc:`entry points <setuptools:userguide/entry_point>` .
166166

167167
.. note:: Since this specification is part of the :doc:`standard library
168-
<python:library/importlib.metadata>`, most packaging tools other than setuptools
168+
<python:library/importlib.metadata>`, packaging tools including setuptools
169169
provide support for defining entry points.
170170

171171
.. _backport: https://importlib-metadata.readthedocs.io/en/latest/

‎source/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows.rst‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ We will have to define two jobs to publish to PyPI
104104
and TestPyPI respectively, and an additional job to
105105
build the distribution packages.
106106

107+
.. important::
108+
109+
Keep the build job separate from the publishing jobs. Building
110+
distributions in a publishing job is unsupported; publishing jobs should
111+
only download the already-built artifacts and upload them.
112+
107113
First, we'll define the job for building the dist packages of
108114
your project and storing them for later use:
109115

‎source/guides/writing-pyproject-toml.rst‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,33 @@ Each of the keys defines a "packaging extra". In the example above, one
175175
could use, e.g., ``pip install your-project-name[gui]`` to install your
176176
project with GUI support, adding the PyQt5 dependency.
177177

178+
.. _self-referential-extras:
179+
180+
You can also define an extra that refers back to the current project with
181+
other extras. This is useful for convenience extras that combine several
182+
optional features (such as an ``all`` extra hosting dependencies from both
183+
``gui`` and ``cli``):
184+
185+
.. code-block:: toml
186+
187+
all = ["your-project-name[gui, cli]"]
188+
189+
The combined extra does not need its own manually maintained copy of each
190+
referenced extra's dependencies, which can otherwise fall out of sync after
191+
a few years of maintenance and bug fixes:
192+
193+
.. code-block:: toml
194+
195+
gui = ["PyQt5"]
196+
cli = [
197+
"rich>=14.2", # version range is added after last "all" extra update
198+
"textual", # dependency newly added since last "all" extra update
199+
"click",
200+
]
201+
all = ["PyQt5", "rich", "click"]
202+
203+
Most package managers now support this kind of extra, including
204+
:ref:`pip`, :ref:`uv`, :ref:`poetry`, :ref:`hatch`, :ref:`pdm` and :ref:`pipenv`.
178205

179206
.. _requires-python:
180207
.. _python_requires:
@@ -555,6 +582,7 @@ A full example
555582
"rich",
556583
"click",
557584
]
585+
all = ["spam-eggs[gui, cli]"]
558586
559587
[project.urls]
560588
Homepage = "https://example.com"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
.. code-block:: toml
2323
2424
[build-system]
25-
requires = ["flit_core >= 3.12.0, <4"]
25+
requires = ["flit_core >= 3.12.0, <5"]
2626
build-backend = "flit_core.buildapi"
2727
2828
.. tab:: PDM
@@ -38,5 +38,5 @@
3838
.. code-block:: toml
3939
4040
[build-system]
41-
requires = ["uv_build >= 0.12.1, <0.13.0"]
41+
requires = ["uv_build >= 0.12.10, <0.13.0"]
4242
build-backend = "uv_build"

‎source/specifications/pyproject-toml.rst‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,11 @@ marker clause on the related ``Requires-Dist`` entries to check the extra name.
505505
Optional dependencies are thus only considered for installation if installation
506506
if the associated extra name is requested.
507507

508+
Dependency specifiers in an extra may self-reference other extras from the
509+
current project (e.g. ``all = ["your-project-name[gui, cli]"]``). See
510+
:ref:`self-referential extras <self-referential-extras>` for an example.
511+
Most package managers now support this kind of extra, including
512+
:ref:`pip`, :ref:`uv`, :ref:`poetry`, :ref:`hatch`, :ref:`pdm` and :ref:`pipenv`.
508513

509514
.. _pyproject-toml-import-names:
510515

@@ -714,4 +719,7 @@ History
714719
as listed in ``dynamic``, with build back-ends only able to append
715720
entries, through :pep:`808`.
716721

722+
- August 2026: Document self-referential extra as a supported feature by many
723+
modern package managers of Python.
724+
717725
.. _TOML: https://toml.io

‎source/specifications/version-specifiers.rst‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,6 @@ identified by the public version identifier, but contains additional changes
172172
indexing and hosting upstream projects, it MUST NOT allow the use of local
173173
version identifiers.
174174

175-
Source distributions using a local version identifier SHOULD provide the
176-
``python.integrator`` extension metadata (as defined in :pep:`459`).
177-
178175

179176
Final releases
180177
--------------

0 commit comments

Comments
 (0)