-
Notifications
You must be signed in to change notification settings - Fork 363
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(semver): improved support of the Python Version Identification part of PEP440 #3474
Conversation
…440 pre/post/developmental releases
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #3474 +/- ##
=======================================
Coverage 96.32% 96.33%
=======================================
Files 191 191
Lines 37407 37445 +38
Branches 3489 3498 +9
=======================================
+ Hits 36032 36071 +39
+ Misses 1375 1374 -1 ☔ View full report in Codecov by Sentry. |
@icj217 Thanks for this! I suspect this needs a new release of pacmak with the respective change first? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See question
@mrgrain Not necessarily. I think this can be merged first because this logic applies to any python package (not just a JSII-based one) that a user registers as a dependency in their project. JSII projects won't be able to publish versions that would exercise the new logic here until the pacmak release is published. |
The semver util's current version logic does not fully implement/adhere to PEP440 in two respects:
1.2.3+foobar
), when used in conjunction with a pre-release label.1.2.3.rc1.post2.dev3
)This PR addresses these gaps so that the python release supports these features. I've kept support for the
pre
label as a synonym fordev
.Projen and JSII's logic diverged ever so slightly re: including a
.
between the version and pre-release labels (e.g. projen was yielding1.2.3rc0
while JSII would yield1.2.3.rc0
. I decided to update projen's logic to mirror that from JSII.E.g. now
1.2.3-rc.1.dev.2.post.3+foobar
will now yield1.2.3.rc1.post3.dev2+foobar
for python packages.I have an identical PR open over in jsii: aws/jsii#4462
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.