feat(gapic-generator-python): setup.py matches prereleases#17370
Draft
noahdietz wants to merge 2 commits into
Draft
feat(gapic-generator-python): setup.py matches prereleases#17370noahdietz wants to merge 2 commits into
noahdietz wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the regular expression used to parse version strings in setup.py templates and golden files to support prerelease suffixes. The reviewer notes that the proposed regex strictly expects a hyphen for prerelease versions, which would fail for PEP 440 compliant versions without a hyphen (such as 1.0.0a1). To prevent installation crashes, the reviewer suggests a more robust regex that matches any trailing non-quote, non-whitespace characters after the patch version.
This file contains hidden or 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
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.
Expand the
version_candidatesmatching regex insetup.pyto support SemVer prerelease suffixes.To support both SemVer and PEP 440 prerelease formats robustly, we can match any trailing non-quote, non-whitespace characters after the major.minor.patch version.
Towards googleapis/librarian#6289