Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
gh-102491: Remove IronPython version check in sys_version#102492
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
Thanks, this looks good. Would you mind adding the news entry?
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.
Hm, not an issue with this PR, but I was curious what IronPython is doing. It looks like their platform.py hashttps://github.com/IronLanguages/ironpython3/blob/f41afc44534786721b89e1efb8e50c4232ee1224/Src/StdLib/Lib/platform.py#L1141 andhttps://github.com/IronLanguages/ironpython3/blob/f41afc44534786721b89e1efb8e50c4232ee1224/Src/StdLib/Lib/platform.py#L1187
Weirdly, IronPython'sdocs indicates that its sys.version would not match the regex we have or the regex they have in their platform.py.
@hauntsaninja Good point. I created an issueIronLanguages/ironpython3#1667. Based on the decision there, can you (as core dev) make a decision on the other ironpython regular expression. |
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.
Thank you!
Uh oh!
There was an error while loading.Please reload this page.
The platform module contains various version checks for systems such as cpython and ironpython. The file also contains a specfic case for ironpython which can be removed (seeIronLanguages/ironpython3#1667)
Removing the check improves the import speed as it avoids the compilation of a two regular expressions.
Note: most of the compiled regular expressions in
platform.pycan be moved into the methods using them, as most results are cached. This would reduce the importtime forplatformeven further: