René's URL Explorer Experiment


Title: gh-102491: Remove IronPython version check in sys_version by eendebakpt · Pull Request #102492 · python/cpython · GitHub

Open Graph Title: gh-102491: Remove IronPython version check in sys_version by eendebakpt · Pull Request #102492 · python/cpython

X Title: gh-102491: Remove IronPython version check in sys_version by eendebakpt · Pull Request #102492 · python/cpython

Description: 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 (see IronLanguages/ironpython3#1667) Removing the check improves the import speed as it avoids the compilation of a two regular expressions. %timeit _ironpython26_sys_version_parser = re.compile(r'([\d.]+)\s*' r'\(IronPython\s*' r'[\d.]+\s*' r'\(([\d.]+)\) on ([\w.]+ [\d.]+(?: \(\d+-bit\))?)\)' ) 383 ns ± 1.66 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each) Note: most of the compiled regular expressions in platform.py can be moved into the methods using them, as most results are cached. This would reduce the importtime for platform even further: Main: The speed of "import platform" is: 8.231517 +- 0.499458 [ms] Regular expressions adapted: The speed of "import platform" is: 7.182120 +- 0.726896 [ms] Issue: gh-102491

Open Graph Description: 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 (see IronLanguages/ironpyt...

X Description: 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 (see IronLanguages/ironpyt...

Opengraph URL: https://github.com/python/cpython/pull/102492

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:5c698f9f-2c45-2284-202c-aa207fa41dc1
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA1D8:214CC9:5E501:85A4A:696A4613
html-safe-nonceea3a14e8674b512bc6cf47d8db9504c3200d0a73e85a627e12ba133bb9c1612a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMUQ4OjIxNENDOTo1RTUwMTo4NUE0QTo2OTZBNDYxMyIsInZpc2l0b3JfaWQiOiI5MDg2ODg3MTA3Nzk0MjIyMjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc6348ca6c605da71059eefff6ddcb924a8a93a1595f568abb90d8beba92d3220
hovercard-subject-tagpull_request:1265933592
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/102492/files
twitter:imagehttps://avatars.githubusercontent.com/u/883786?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/883786?s=400&v=4
og:image:altThe 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 (see IronLanguages/ironpyt...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None3f871c8e07f0ae1886fa8dac284166d28b09ad5bada6476fc10b674e489788ef
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release63c426b30d262aba269ef14c40e3c817b384cd61
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/102492/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F102492%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F102492%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/102492/files
Reloadhttps://github.com/python/cpython/pull/102492/files
Reloadhttps://github.com/python/cpython/pull/102492/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/102492/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/102492/files
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
hauntsaninjahttps://github.com/hauntsaninja
python:mainhttps://github.com/python/cpython/tree/main
eendebakpt:remove_ironpython_python2https://github.com/eendebakpt/cpython/tree/remove_ironpython_python2
Conversation 4 https://github.com/python/cpython/pull/102492
Commits 8 https://github.com/python/cpython/pull/102492/commits
Checks 0 https://github.com/python/cpython/pull/102492/checks
Files changed https://github.com/python/cpython/pull/102492/files
Please reload this pagehttps://github.com/python/cpython/pull/102492/files
gh-102491: Remove IronPython version check in sys_version https://github.com/python/cpython/pull/102492/files#top
Show all changes 8 commits https://github.com/python/cpython/pull/102492/files
c8845bc remove ironpython python 2.x version check eendebakpt Mar 7, 2023 https://github.com/python/cpython/pull/102492/commits/c8845bcddbc47b506298a250c18d86eaf11a0e13
b9d0b33 remove old tests; add a new test for python 3.x eendebakpt Mar 7, 2023 https://github.com/python/cpython/pull/102492/commits/b9d0b333edf2066e7d2a96178639182965cfe10b
0b51602 increase coverage of _sys.version test eendebakpt Mar 7, 2023 https://github.com/python/cpython/pull/102492/commits/0b51602abe5deb632f1fce19b87f4d291ed4dece
e56ddfc fix test eendebakpt Mar 7, 2023 https://github.com/python/cpython/pull/102492/commits/e56ddfc98e2544b82cb01e587e2ff6fd969c443c
839baae 📜🤖 Added by blurb_it. blurb-it[bot] Mar 8, 2023 https://github.com/python/cpython/pull/102492/commits/839baaea3580e2c8467361f269b0b35f2cabbd21
7ffe733 remove IronPython version checks eendebakpt Mar 12, 2023 https://github.com/python/cpython/pull/102492/commits/7ffe733302b96f4f61d95eb794205730be1e6e76
e9ab84a Merge branch 'main' into remove_ironpython_python2 eendebakpt Mar 12, 2023 https://github.com/python/cpython/pull/102492/commits/e9ab84a4770dc56a3266faf3e0e3c84c8dd65a5f
165b510 Merge branch 'main' into remove_ironpython_python2 eendebakpt Mar 19, 2023 https://github.com/python/cpython/pull/102492/commits/165b510bce75ad6f1b824d7eb1b7a75f30248fbe
Clear filters https://github.com/python/cpython/pull/102492/files
Please reload this pagehttps://github.com/python/cpython/pull/102492/files
Please reload this pagehttps://github.com/python/cpython/pull/102492/files
platform.py https://github.com/python/cpython/pull/102492/files#diff-cb1ba6039236dca71c97ea898f2798c60262c30614192862259889f839e4d503
test_platform.py https://github.com/python/cpython/pull/102492/files#diff-894592671e2b62da7a88ead41c76b0fa35dbec0e17b8779ea0d11aea2657cb39
2023-03-08-08-37-36.gh-issue-102491.SFvvsC.rst https://github.com/python/cpython/pull/102492/files#diff-cea0808a26e000473e35eb9cf7260118d02fc59d9e0df30e2591a913eb8eb4ec
Lib/platform.pyhttps://github.com/python/cpython/pull/102492/files#diff-cb1ba6039236dca71c97ea898f2798c60262c30614192862259889f839e4d503
View file https://github.com/eendebakpt/cpython/blob/165b510bce75ad6f1b824d7eb1b7a75f30248fbe/Lib/platform.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/102492/{{ revealButtonHref }}
https://github.com/python/cpython/pull/102492/files#diff-cb1ba6039236dca71c97ea898f2798c60262c30614192862259889f839e4d503
https://github.com/python/cpython/pull/102492/files#diff-cb1ba6039236dca71c97ea898f2798c60262c30614192862259889f839e4d503
https://github.com/python/cpython/pull/102492/files#diff-cb1ba6039236dca71c97ea898f2798c60262c30614192862259889f839e4d503
https://github.com/python/cpython/pull/102492/files#diff-cb1ba6039236dca71c97ea898f2798c60262c30614192862259889f839e4d503
https://github.com/python/cpython/pull/102492/files#diff-cb1ba6039236dca71c97ea898f2798c60262c30614192862259889f839e4d503
https://github.com/python/cpython/pull/102492/files#diff-cb1ba6039236dca71c97ea898f2798c60262c30614192862259889f839e4d503
Lib/test/test_platform.pyhttps://github.com/python/cpython/pull/102492/files#diff-894592671e2b62da7a88ead41c76b0fa35dbec0e17b8779ea0d11aea2657cb39
View file https://github.com/eendebakpt/cpython/blob/165b510bce75ad6f1b824d7eb1b7a75f30248fbe/Lib/test/test_platform.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/102492/{{ revealButtonHref }}
https://github.com/python/cpython/pull/102492/files#diff-894592671e2b62da7a88ead41c76b0fa35dbec0e17b8779ea0d11aea2657cb39
https://github.com/python/cpython/pull/102492/files#diff-894592671e2b62da7a88ead41c76b0fa35dbec0e17b8779ea0d11aea2657cb39
https://github.com/python/cpython/pull/102492/files#diff-894592671e2b62da7a88ead41c76b0fa35dbec0e17b8779ea0d11aea2657cb39
https://github.com/python/cpython/pull/102492/files#diff-894592671e2b62da7a88ead41c76b0fa35dbec0e17b8779ea0d11aea2657cb39
https://github.com/python/cpython/pull/102492/files#diff-894592671e2b62da7a88ead41c76b0fa35dbec0e17b8779ea0d11aea2657cb39
https://github.com/python/cpython/pull/102492/files#diff-894592671e2b62da7a88ead41c76b0fa35dbec0e17b8779ea0d11aea2657cb39
Misc/NEWS.d/next/Core and Builtins/2023-03-08-08-37-36.gh-issue-102491.SFvvsC.rsthttps://github.com/python/cpython/pull/102492/files#diff-cea0808a26e000473e35eb9cf7260118d02fc59d9e0df30e2591a913eb8eb4ec
View file https://github.com/eendebakpt/cpython/blob/165b510bce75ad6f1b824d7eb1b7a75f30248fbe/Misc/NEWS.d/next/Core%20and%20Builtins/2023-03-08-08-37-36.gh-issue-102491.SFvvsC.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/102492/{{ revealButtonHref }}
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.