Skip to content

Fix #460 Improve bump_prerelease to alway get a newer version #462

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

Merged
merged 3 commits into from
Jan 28, 2025

Conversation

Learloj
Copy link
Contributor

@Learloj Learloj commented Jan 26, 2025

This PR fixes #460 and contains the following changes:

  • Bumping an existing prerelease always results in a newer prerelease
  • Bumping an empty prerelease can optionally bump the patch version to ensure a newer version

I ran the test suites successfully, except for 'checks', which also failed before I made any change. I ensured I did not introduce any new errors in this suite. I also added quite a bunch of tests to validate the new functionality, and adjusted a few that changed due to changing existing functionality.

Open to any suggestions for improvement, as my Python experience is a bit limited :-)

Copy link
Member

@tomschr tomschr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Learloj Thank you very much for all your work! ❤️ It looks very good, I have only some minor comments and questions to you.

Let me know what you think. Great work! 👍

@tomschr tomschr added Release_3.x.y Only for the major release 3 Bug Error, flaw or fault to produce incorrect or unexpected results labels Jan 27, 2025
@tomschr tomschr changed the title Fix python-semver#460 Improve bump_prerelease to alway get a newer version Fix #460 Improve bump_prerelease to alway get a newer version Jan 27, 2025
@Learloj
Copy link
Contributor Author

Learloj commented Jan 27, 2025

@tomschr would you like me to add commits per change, 1 commit for all changes, or to squash it all into the PR, so the entire PR is 1 commit?

@tomschr
Copy link
Member

tomschr commented Jan 27, 2025

@tomschr would you like me to add commits per change, 1 commit for all changes, or to squash it all into the PR, so the entire PR is 1 commit?

@Learloj Whatever you prefer to your work. I don't want to make your work more complicated. In the end, I'll squash merge the commit anyway.

@tomschr
Copy link
Member

tomschr commented Jan 28, 2025

Thank you @Learloj for all your work! Much appreciated! ❤️

I would consider it as complete now. If you don't have anything else to add or change, I'd like to squash-merge it to master soon.

Open to any suggestions for improvement, as my Python experience is a bit limited

I haven't noticed that! You are doing great! 👍

Again, thanks!

@Learloj
Copy link
Contributor Author

Learloj commented Jan 28, 2025

@tomschr my pleasure! I greatly appreciate your fast replies & feedback, and happy to help out on one of the projects we use :-)

I have nothing to add, so feel free to merge.

Bas Roos and others added 3 commits January 28, 2025 13:34
…a newer version, and raising an empty prerelease version has the option to raise the patch version as well
Co-authored-by: Tom Schraitle <tomschr@users.noreply.github.com>
@tomschr tomschr merged commit d8813b6 into python-semver:master Jan 28, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Error, flaw or fault to produce incorrect or unexpected results Release_3.x.y Only for the major release 3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

semver.bump_prerelease on *-rc9 results in lower version
2 participants