Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable poetry version postrelease to create version numbers like 1.0.0post1 #9368

Open
dfm-vmd opened this issue May 1, 2024 · 2 comments
Open
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged

Comments

@dfm-vmd
Copy link

dfm-vmd commented May 1, 2024

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

@dfm-vmd dfm-vmd added kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels May 1, 2024
@dimbleby
Copy link
Contributor

dimbleby commented May 1, 2024

what you propose to do is "strongly discouraged" - https://packaging.python.org/en/latest/specifications/version-specifiers/#post-releases

The use of post-releases to publish maintenance releases containing actual bug fixes is strongly discouraged.

I do not think that encouraging this mis-use of post-releases would make the world a better place

@dfm-vmd
Copy link
Author

dfm-vmd commented May 2, 2024

I'm not trying to cast any judgement on the spec, just trying to fully enable it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Feature requests/implementations status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants