-
Notifications
You must be signed in to change notification settings - Fork 245
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(jsii-pacmak): fully support the Python Version Identification part of PEP440 #4462
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
icj217
changed the title
fix(jsii-pacmak): Pass on semver build metadata as local version identifiers
fix(jsii-pacmak): Pass on semver build metadata as python local version identifiers
Mar 18, 2024
…t PEP440 pre, post, and developmental releases
icj217
changed the title
fix(jsii-pacmak): Pass on semver build metadata as python local version identifiers
fix(jsii-pacmak): Improve python release version calculation logic
Mar 18, 2024
icj217
changed the title
fix(jsii-pacmak): Improve python release version calculation logic
fix(jsii-pacmak): Improve python release version conversion logic
Mar 18, 2024
mrgrain
approved these changes
Mar 25, 2024
Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it! |
mrgrain
changed the title
fix(jsii-pacmak): Improve python release version conversion logic
fix(jsii-pacmak): fully support the Python Version Identification part of PEP440
Mar 25, 2024
Merging (with squash)... |
Merging (with squash)... |
mergify bot
pushed a commit
to projen/projen
that referenced
this pull request
Mar 25, 2024
…rt of PEP440 (#3474) The semver util's current version logic does not fully implement/adhere to PEP440 in two respects: * There is no support for "[local version identifiers](https://packaging.python.org/en/latest/specifications/version-specifiers/#local-version-identifiers)", which are basically the same as SemVer's build metadata (e.g. `1.2.3+foobar`), when used in conjunction with a pre-release label. * The current pre-release logic doesn't reflect the ability for python pre-releases to include [post-release](https://packaging.python.org/en/latest/specifications/version-specifiers/#post-releases) and [developmental release](https://packaging.python.org/en/latest/specifications/version-specifiers/#developmental-releases) labels in conjunction with the pre-release itself (e.g. `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 for `dev`. Projen and JSII's logic diverged ever so slightly re: including a `.` between the version and pre-release labels (e.g. projen was yielding `1.2.3rc0` while JSII would yield `1.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 yield `1.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.
@mrgrain Any idea when this will be released? Not sure if there's an established cadence/process that I'm unaware of. |
Sorry, this fell through the cracks. We'll do one next week. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
jsii-pacmak
'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
,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.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.