Skip to content

Commit 6603012

Browse files
📦 build: move dev extras to PEP 735 dependency groups (#102)
The `docs` and `testing` extras serve only development, yet as `[project.optional-dependencies]` they ship in the published wheel metadata and let anyone `pip install python-discovery[testing]`. PEP 735 `[dependency-groups]` fits dev-only sets better, since a group stays local to the source tree and never publishes. 📦 This moves both extras into the existing `[dependency-groups]` table, with `testing` becoming `test` and `docs` keeping its name, and drops the now-empty `optional-dependencies`. The tox environments that pulled these extras (`env_run_base`, `docs`, and `dev`) now reference the groups through `dependency_groups` instead of `extras`. The `testing` extra is gone; use the `test` group. No consumer-facing install extras remain, so `python-discovery[docs]` and `python-discovery[testing]` no longer resolve. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 8df9588 commit 6603012

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

‎pyproject.toml‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,28 +46,28 @@ dependencies = [
4646
"filelock>=3.15.4",
4747
"platformdirs<5,>=4.3.6",
4848
]
49-
optional-dependencies.docs = [
50-
"furo>=2025.12.19",
51-
"sphinx>=9.1",
52-
"sphinx-autodoc-typehints>=3.6.3",
53-
"sphinxcontrib-mermaid>=2",
54-
"sphinxcontrib-towncrier>=0.4",
55-
"towncrier>=25.8",
56-
]
57-
optional-dependencies.testing = [
58-
"covdefaults>=2.3",
59-
"coverage>=7.5.4",
60-
"pytest>=8.3.5",
61-
"pytest-mock>=3.14",
62-
"setuptools>=75.1",
63-
]
6449
urls.Changelog = "https://github.com/tox-dev/python-discovery/releases"
6550
urls.Documentation = "https://python-discovery.readthedocs.io"
6651
urls.Homepage = "https://github.com/tox-dev/python-discovery"
6752
urls.Source = "https://github.com/tox-dev/python-discovery"
6853
urls.Tracker = "https://github.com/tox-dev/python-discovery/issues"
6954

7055
[dependency-groups]
56+
test = [
57+
"covdefaults>=2.3",
58+
"coverage>=7.5.4",
59+
"pytest>=8.3.5",
60+
"pytest-mock>=3.14",
61+
"setuptools>=75.1",
62+
]
63+
docs = [
64+
"furo>=2025.12.19",
65+
"sphinx>=9.1",
66+
"sphinx-autodoc-typehints>=3.6.3",
67+
"sphinxcontrib-mermaid>=2",
68+
"sphinxcontrib-towncrier>=0.4",
69+
"towncrier>=25.8",
70+
]
7171
release = [
7272
"gitpython>=3.1.46",
7373
"packaging>=26",

‎tox.toml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ skip_missing_interpreters = true
66
description = "run the tests with pytest"
77
package = "wheel"
88
wheel_build_env = ".pkg"
9-
extras = ["testing"]
9+
dependency_groups = ["test"]
1010
pass_env = ["DIFF_AGAINST", "PYTEST_*"]
1111
set_env.COVERAGE_FILE = "{work_dir}{/}.coverage.{env_name}"
1212
commands = [
@@ -46,7 +46,7 @@ commands = [["ty", "check", "--output-format", "concise", "--error-on-warning",
4646

4747
[env.docs]
4848
description = "build documentation"
49-
extras = ["docs"]
49+
dependency_groups = ["docs"]
5050
commands = [
5151
[
5252
"sphinx-build",
@@ -81,5 +81,5 @@ commands = [["python", "{tox_root}/tasks/release.py", "--version", "{posargs}"]]
8181
[env.dev]
8282
description = "generate a DEV environment"
8383
package = "editable"
84-
extras = ["testing"]
84+
dependency_groups = ["test"]
8585
commands = [["uv", "pip", "tree"], ["python", "-c", "import sys; print(sys.executable)"]]

0 commit comments

Comments
 (0)