Migrate development extras to dependency groups#1152
Merged
jpadilla merged 1 commit intojpadilla:masterfrom Mar 16, 2026
Merged
Migrate development extras to dependency groups#1152jpadilla merged 1 commit intojpadilla:masterfrom
jpadilla merged 1 commit intojpadilla:masterfrom
Conversation
9f950bd to
0be51f4
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates contributor-focused dependencies (dev, docs, tests) from project.optional-dependencies (extras) to PEP 735 dependency groups, and updates automation to install those groups to reduce lockfile noise and avoid exposing contributor extras on PyPI.
Changes:
- Add
[dependency-groups]inpyproject.tomland removedev/docs/testsfromproject.optional-dependencies. - Update
tox.inienvs to installtests/docs/devviadependency_groups(and bumplintto Python 3.10). - Update CI and RTD config to install dependency groups instead of extras.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
pyproject.toml |
Defines dev/docs/tests dependency groups and removes corresponding extras. |
tox.ini |
Switches tox env dependency installation from extras to dependency groups; sets lint to Python 3.10. |
.github/workflows/main.yml |
Updates dev install step to use --group dev. |
.readthedocs.yaml |
Changes RTD install behavior to install docs group (and crypto extra). |
CHANGELOG.rst |
Notes migration from extras to dependency groups under Unreleased. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
This introduces the following changes: * The `dev` extra is moved to a dependency group. * The `tests` extra is moved to a dependency group. * The `docs` extra is moved to a dependency group. * `tox.ini` has been updated to use the dependency groups. * `main.yml` has been updated to install the `dev` dependency group. * The Read the Docs config is updated to install the `docs` dependency group. This follows the how-to documentation published by Read the Docs. https://docs.readthedocs.com/platform/latest/build-customization.html#install-dependencies-from-dependency-groups In addition, when tox was run, the `lint` environment failed because pyupgrade doesn't support Python 3.9. Therefore, one additional change was made: * The `lint` tox environment's `basepython` is updated to Python 3.10.
0be51f4 to
928d8c6
Compare
jpadilla
approved these changes
Mar 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
These changes are being introduced because
extrasappear in lock files. When Dependabot opens security vulnerability PRs, thedev,docs, andtestsextras also appear in the diff. In addition, having test dependencies asextrascan affect dependency version resolution.This PR will also eliminate the unnecessary
extrasappearing on the PyPI page:This introduces the following changes:
The
devextra is moved to a dependency group.The
testsextra is moved to a dependency group.The
docsextra is moved to a dependency group.tox.inihas been updated to use the dependency groups.main.ymlhas been updated to install thedevdependency group.The Read the Docs config is updated to install the
docsdependency group.This follows the how-to documentation published by Read the Docs. https://docs.readthedocs.com/platform/latest/build-customization.html#install-dependencies-from-dependency-groups
In addition, when tox was run, the
lintenvironment failed because pyupgrade doesn't support Python 3.9.Therefore, one additional change was made:
linttox environment'sbasepythonis updated to Python 3.10.