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

Improve handling of Python versioning strings #6300

Open
jeffwidman opened this issue Dec 10, 2022 · 0 comments
Open

Improve handling of Python versioning strings #6300

jeffwidman opened this issue Dec 10, 2022 · 0 comments
Labels
L: python:pip Python packages via pip L: python:pipenv Python packages via pipenv L: python:poetry Python packages via poetry python Dependabot pull requests that update Python code T: tech-debt ⚙️ versioning

Comments

@jeffwidman
Copy link
Member

jeffwidman commented Dec 10, 2022

While working on #4928 Jake noticed that some of the ordering and parsing wasn't quite up to PEP 440's standards. In that PEP they have a list of version strings in order:

1.dev0
1.0.dev456
1.0a1
1.0a2.dev456
1.0a12.dev456
1.0a12
1.0b1.dev456
1.0b2
1.0b2.post345.dev456
1.0b2.post345
1.0rc1.dev456
1.0rc1
1.0
1.0+abc.5
1.0+abc.7
1.0+5
1.0.post456.dev34
1.0.post456
1.0.15
1.1.dev1

He tried those with our current setup and it failed in several ways. So this issue is to circle back and use the official regex and normalization logic to make that list ☝️ pass in a test.

Also we need to make sure that doing this doesn't break any current assumptions. One thought was since "Post releases" don't add anything substantial to the release we might want to ignore them completely otherwise Dependabot might annoy customers with unnecessary bumps.

I suspect we will see more bugs around Dependabot bumping versions incorrectly until we match the PEP standard.

Related:

@jeffwidman jeffwidman added T: tech-debt ⚙️ L: python:pip Python packages via pip L: python:poetry Python packages via poetry python Dependabot pull requests that update Python code L: python:pipenv Python packages via pipenv labels Dec 10, 2022
@jeffwidman jeffwidman changed the title Handle Python versioning Improve handling of Python versioning strings Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: python:pip Python packages via pip L: python:pipenv Python packages via pipenv L: python:poetry Python packages via poetry python Dependabot pull requests that update Python code T: tech-debt ⚙️ versioning
Projects
None yet
Development

No branches or pull requests

2 participants