What happened
Release-please's Python release-type writes the raw SemVer version string to pyproject.toml's [project] version field, with no PEP 440 normalization for prerelease versions.
Observed on #817 (the v6.0.0-beta.1 release PR):
```
-version = "5.7.0"
+version = "6.0.0-beta.1" ← invalid PEP 440; PyPI rejects
```
Expected: version = "6.0.0b1" (PEP 440 form).
Worked around by hand-editing the release PR in commit 3e0f7e17 before merging, but the next prerelease bump will reproduce the same bug and need the same hand-edit. Need a permanent fix.
Background
The aao-ipr-bot flagged this on #804 (review comment). At the time we believed dropping the generic JSON extra-files updater would let the Python release-type's native pyproject.toml updater handle the conversion. That turned out to be wrong — the native updater also writes the raw SemVer string.
Options for a permanent fix
- Custom updater via
extra-files. Use an extra-files entry with type: "generic" or type: "python" (if such a type exists in release-please's schema) that knows PEP 440. Worth checking release-please's docs for a Python-aware pyproject.toml updater.
- Post-bump GitHub Action. Add a step to the release-please workflow that runs after release-please opens/updates the release PR and normalizes the version. Cheap to write but adds a moving part.
- Upstream fix in release-please. File against
googleapis/release-please — this looks like a real bug in the Python strategy. Risky from a timeline perspective.
- Switch off the prerelease line. Cut 6.0.0 GA without intermediate betas (won't work — we explicitly need beta testing on salesagent before GA).
I'd lean toward (2) as the immediate path and file (3) in parallel.
Acceptance
Refs
What happened
Release-please's Python release-type writes the raw SemVer version string to
pyproject.toml's[project] versionfield, with no PEP 440 normalization for prerelease versions.Observed on #817 (the v6.0.0-beta.1 release PR):
```
-version = "5.7.0"
+version = "6.0.0-beta.1" ← invalid PEP 440; PyPI rejects
```
Expected:
version = "6.0.0b1"(PEP 440 form).Worked around by hand-editing the release PR in commit
3e0f7e17before merging, but the next prerelease bump will reproduce the same bug and need the same hand-edit. Need a permanent fix.Background
The aao-ipr-bot flagged this on #804 (review comment). At the time we believed dropping the generic JSON
extra-filesupdater would let the Python release-type's nativepyproject.tomlupdater handle the conversion. That turned out to be wrong — the native updater also writes the raw SemVer string.Options for a permanent fix
extra-files. Use anextra-filesentry withtype: "generic"ortype: "python"(if such a type exists in release-please's schema) that knows PEP 440. Worth checking release-please's docs for a Python-aware pyproject.toml updater.googleapis/release-please— this looks like a real bug in the Python strategy. Risky from a timeline perspective.I'd lean toward (2) as the immediate path and file (3) in parallel.
Acceptance
version = "6.0.0b2"in pyproject.toml automatically, no hand-edit required.version = "6.0.0").Refs