fix(config): replace removed Actor.name_email_regex from GitPython - #1477
Conversation
…itpython (#351) GitPython 3.1.60 (2026-08-25) removed Actor.name_email_regex, which semantic_release.cli.config reads unconditionally — every release run now crashes on 'type object Actor has no attribute name_email_regex'. PSR pins gitpython ~= 3.0 (unpinned patch range), and the upstream action's Docker image is rebuilt from PyPI at job start regardless of which action SHA release.yml pins, so this recurs on every push to main until upstream ships python-semantic-release/python-semantic-release#1477. Vendors the action's Dockerfile/action.sh/action.yml unchanged, adding only a gitpython==3.1.59 pin to requirements.txt. Verified locally: the vendored image resolves gitpython 3.1.59 and `semantic-release version` loads config and runs cleanly. Revert to the upstream action once #1477 ships in a release.
|
oh yeah my CI is also broken |
|
Thanks for submitting this. Very frustrating how someone else's change unidentified breaking change affects this project. Will try to get a new version published today. |
Thank you! |
The build is failing on exactly what is being fixed... |
|
I ran a test in my project targeting the forked version of @olivialewke , but I am encountering the same problem. |
|
GitPython 3.1.61 has been released & bring back, adding a deprecation notice, the unwanted breaking change in gitpython-developers/GitPython#2221 So I guess that this should be fixed, though it would be better to still handle this since the field is deprecated & will be removed in next major release (4.x) |
My PSR just finished successful again :-) |
4ad93f1 to
ed6b1cb
Compare
With the change in GitPython v3.1.60, they removed the regex for a commit author string, so we must do it ourselves. Resolves: python-semantic-release#1476
ed6b1cb to
de86e16
Compare
🎉 This PR has been published as part of v10.6.2 🎉You can find more information about this release on the GitHub Releases page. |
Fixes #1476.
What
GitPython v3.1.60 (released 2026-08-25) removed the
name_email_regexclass attribute fromgit.Actor, replacing its internal use inActor._from_stringwith string partitioning.RuntimeContext.from_raw_config()reads it unconditionally, so every command that loads configuration fails with:Since PSR requires
gitpython ~= 3.0, fresh installs — including every run of the official GitHub Action, which resolves transitive dependencies at image-build time — pick up the broken version automatically.How
GitPython no longer exposes a public equivalent, so there is nothing to migrate to. This adds
NAME_EMAIL_REGEXtosemantic_release.constwith the same pattern GitPython used (r"(.*) <(.*?)>") and uses it in the two placesActor.name_email_regexwas referenced.Actoris still used to construct the commit author, so behaviour is unchanged — including the error message, which now interpolates.patternto keep the same readable output.An alternative would be to pin
gitpython < 3.1.60, but that leaves users stranded on a release they may want for its security fixes.Testing
The existing
test_commit_author_configurablealready reproduces the failure on GitPython 3.1.60 and passes with this change. Added direct coverage of the pattern itself so a future change to it is caught independently of GitPython.ruff checkreports no new findings against these files.