python-poetry / python-poetry/poetry
Enable `poetry version postrelease` to create version numbers like 1.0.0post1
@Secrus is already working on this.
Since Sep 25, 2024.
- Dominant language
- Python
- Stars
- 34.3k
- Forks
- 2.5k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 30
Description
Issue Kind
Brand new capability
Description
PEP440 allows for postrelease version numbers like 1.0.2post1. I'd like to enable to poetry CLI to automate creating postrelease versions. The command poetry version postrelease should convert the following version numbers in pyproject.toml.
| original version | after running poetry version postrelease |
|---|---|
| 0.0.1 | 0.0.1post0 |
| 0.1.0 | 0.1.0post0 |
| 1.0.0 | 1.0.0post0 |
| 1.0.0post0 | 1.0.0post1 |
| 1.0.0a0 | 1.0.0a0post0 |
PEP440 documentation:
https://peps.python.org/pep-0440/#post-releases
Impact
I'd like to use poetry to maintain and automate my version numbers for a work project. I'd like to use the postrelease spec to enable hotfixes on old versions. I.e. if I am running v1.0.0 in a production setting, and actively contributing to a v1.0.1, I'd like to be able to create hotfixes or updates to v1.0.0 (deployed under v1.0.0post1) without cross-pollenation of changes with v1.0.1.
Workarounds
Manually update version in pyproject.toml
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.