Skip to content

🐛 fix(deps): add pre-commit to release dependency group#1000

Merged
gaborbernat merged 1 commit intopypa:mainfrom
gaborbernat:fix-pre-release-precommit-dep
Mar 24, 2026
Merged

🐛 fix(deps): add pre-commit to release dependency group#1000
gaborbernat merged 1 commit intopypa:mainfrom
gaborbernat:fix-pre-release-precommit-dep

Conversation

@gaborbernat
Copy link
Copy Markdown
Collaborator

The pre-release workflow fails at run 23515770142 because the release script calls pre-commit to format and lint the generated release commit, but pre-commit is not installed in the release tox environment. 🔧 The script invokes pre-commit run --all-files on lines 70 and 72 of tasks/release.py, resulting in a FileNotFoundError when the command cannot be found.

Added pre-commit >= 3.0 to the release dependency group in pyproject.toml. This matches the version constraint used in the docs dependency group and ensures the release script can run formatting hooks on the generated changelog and version updates.

Without this dependency, the release workflow cannot complete successfully. With it, the pre-commit hooks will properly format the release commit before it gets tagged and pushed.

The release.py script calls pre-commit on lines 70 and 72 to format and
lint the generated release commit. Without pre-commit in the release
dependency group, the workflow fails with FileNotFoundError when tox
runs the release environment.

Added pre-commit >= 3.0 to match the version used in the docs dependency
group, ensuring the release script can run formatting hooks on the
generated changelog and version updates.
@gaborbernat gaborbernat added the bug Something isn't working label Mar 24, 2026
@gaborbernat gaborbernat merged commit 062e7e2 into pypa:main Mar 24, 2026
65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants