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

fix(versioning/poetry): version strings that include a leading zero in their pre, post, or dev fields #28158

Merged
merged 11 commits into from Apr 9, 2024

Conversation

henry-fn
Copy link
Contributor

Changes

Allows parsing of python version strings that include a leading zero in their pre, post, or dev fields (allowed by Python but not by Semver). An example would be 0.3.0b01 which is valid but would fail to parse under the old code.

Context

Our self hosted renovate was failing to update one package that uses this versioning scheme

Documentation (please check one with an [x])

[ ] I have updated the documentation, or
[x] No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

[] Code inspection only, or
[x] Newly added/modified unit tests, or
[ ] No unit tests but ran on a real repository, or
[ ] Both unit tests + ran on a real repository

@henry-fn henry-fn changed the title Fix parsing of python version strings that include a leading zero in their pre, post, or dev fields fix: parsing of python version strings that include a leading zero in their pre, post, or dev fields Mar 27, 2024
@rarkins rarkins changed the title fix: parsing of python version strings that include a leading zero in their pre, post, or dev fields fix(versioning/poetry): version strings that include a leading zero in their pre, post, or dev fields Mar 27, 2024
@rarkins rarkins enabled auto-merge March 27, 2024 20:55
auto-merge was automatically disabled March 27, 2024 21:07

Head branch was pushed to by a user without write access

@henry-fn
Copy link
Contributor Author

henry-fn commented Mar 27, 2024

sorry 🤦 I clearly can't read instructions and didn't realize this had already been looked at before I pushed a small change to the tests

@henry-fn
Copy link
Contributor Author

henry-fn commented Apr 1, 2024

@rarkins sorry I pushed I hadn't realized you had already taken a look. It was a tiny change to the tests to make them look more similar in style.

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

see comment

lib/modules/versioning/poetry/transform.ts Outdated Show resolved Hide resolved
@henry-fn henry-fn requested a review from viceice April 2, 2024 16:31
@henry-fn henry-fn requested a review from viceice April 8, 2024 17:24
@henry-fn henry-fn requested a review from viceice April 9, 2024 13:07
@rarkins rarkins enabled auto-merge April 9, 2024 13:10
@rarkins rarkins added this pull request to the merge queue Apr 9, 2024
Merged via the queue into renovatebot:main with commit e155173 Apr 9, 2024
37 checks passed
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 37.280.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants