-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
configure: use sys.version_info to get python version #1504
Conversation
This is cleaner than filtering additional strings from platform.python_version().
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.
SGTM but can you add a test case with one of the custom python version numbers?
The way existing tests work is to mock out the CLI invocation of python with something that returns a string to parse. The whole point of this PR is to make sure the CLI result no longer contains any custom version strings anymore. Besides, there never was a test for filtering "rc" or "+" either. |
@hashseed Ah sorry, misread the Git diff. Agree that since the extra bits are being pulled out, there's nothing to really check. |
Can this be merged? |
@hashseed I can merge this to |
This is cleaner than filtering additional strings from platform.python_version(). PR-URL: #1504 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Rod Vagg <rod@vagg.org>
pulled in to both master and v3.x |
This is cleaner than filtering additional strings from platform.python_version(). PR-URL: #1504 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Rod Vagg <rod@vagg.org>
@hashseed @rvagg @maclover7 this broke python3, i created a PR with a small fix here #1534 |
@greenaddress @maclover7 I meet this bug too.. |
Instead of parsing the string returned by
platform.python_version()
, it is easier to use the integers insys.version_info
. This avoids the need to pattern match and remove extra characters.This is necessary because V8's infrastructure uses a Python that includes "chromium" in the version string, which would have needed to be filtered out too.
Checklist
npm install && npm test
passesDescription of change