René's URL Explorer Experiment


Title: gh-152680: Use the _wmi module in test.pythoninfo by vstinner · Pull Request #152824 · python/cpython · GitHub

Open Graph Title: gh-152680: Use the _wmi module in test.pythoninfo by vstinner · Pull Request #152824 · python/cpython

X Title: gh-152680: Use the _wmi module in test.pythoninfo by vstinner · Pull Request #152824 · python/cpython

Description: On Windows, replace wmic command with _wmi module to get the operating system caption and version. The wmic tool is deprecated since January 2024: https://techcommunity.microsoft.com/blog/windows-itpro-blog/wmi-command-line-wmic-utility-deprecation-next-steps/4039242 For example, it's no longer installed in Windows images on GitHub Action. Fix also run_command(): no longer try to spawn a subprocess if the platform doesn't support subprocess. It avoids logging run_command() errors. Issue: gh-152680

Open Graph Description: On Windows, replace wmic command with _wmi module to get the operating system caption and version. The wmic tool is deprecated since January 2024: https://techcommunity.microsoft.com/blog/windows-i...

X Description: On Windows, replace wmic command with _wmi module to get the operating system caption and version. The wmic tool is deprecated since January 2024: https://techcommunity.microsoft.com/blog/windows-i...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:9cfd7cce-5c29-f7ba-def9-67977c8fd0e7
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA4EE:1C38BA:256F6D8:320AD84:6A52055C
html-safe-nonce3ab588f83c05794feb1703e80007820873b8a85de17821b2aeeb0d21dd5302d1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNEVFOjFDMzhCQToyNTZGNkQ4OjMyMEFEODQ6NkE1MjA1NUMiLCJ2aXNpdG9yX2lkIjoiNTM3OTA3ODg5NTExODE4OTkxNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacd1494577381b0f5667e8cec971cfdd09c9e546be8e0f3b03c114c272394f0b5d
hovercard-subject-tagpull_request:3973836861
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/152824/files
twitter:imagehttps://avatars.githubusercontent.com/u/194129?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/194129?s=400&v=4
og:image:altOn Windows, replace wmic command with _wmi module to get the operating system caption and version. The wmic tool is deprecated since January 2024: https://techcommunity.microsoft.com/blog/windows-i...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
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
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7aed05249554b889eb33d002851a973eebcc7e91
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/152824/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F152824%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
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
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
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/enterprise/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%2F152824%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/152824/files
Reloadhttps://github.com/python/cpython/pull/152824/files
Reloadhttps://github.com/python/cpython/pull/152824/files
Please reload this pagehttps://github.com/python/cpython/pull/152824/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/152824/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 35k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.7k 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.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
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 and quality 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
vstinnerhttps://github.com/vstinner
python:mainhttps://github.com/python/cpython/tree/main
vstinner:pythoninfo_wmihttps://github.com/vstinner/cpython/tree/pythoninfo_wmi
Conversation 12 https://github.com/python/cpython/pull/152824
Commits 9 https://github.com/python/cpython/pull/152824/commits
Checks 62 https://github.com/python/cpython/pull/152824/checks
Files changed 1 https://github.com/python/cpython/pull/152824/files
gh-152680: Use the _wmi module in test.pythoninfo https://github.com/python/cpython/pull/152824/files#top
Show all changes 9 commits https://github.com/python/cpython/pull/152824/files
2a3ce9a Use the _wmi module in test.pythoninfo vstinner Jul 1, 2026 https://github.com/python/cpython/pull/152824/commits/2a3ce9ac0c4df679b9f2b3563bcc5e9a08437ce4
42b54e7 Detect QEMU on Windows vstinner Jul 1, 2026 https://github.com/python/cpython/pull/152824/commits/42b54e7f39c3c9a1824f0761442b774d0278fe60
fe39732 Get also the BIOS version vstinner Jul 1, 2026 https://github.com/python/cpython/pull/152824/commits/fe39732c77dfda3543080a09a8d1595801ad5d50
896b420 Log BIOS serial number vstinner Jul 1, 2026 https://github.com/python/cpython/pull/152824/commits/896b4208df3c8c2e0409d7d98efdba65188bf3c7
a078763 Fix detect_virt() call vstinner Jul 1, 2026 https://github.com/python/cpython/pull/152824/commits/a0787630ee9dc823d6212c1f59826d345effb80d
947d5a8 Get Model vstinner Jul 1, 2026 https://github.com/python/cpython/pull/152824/commits/947d5a8ef1754e8eebdc1a880b3a542ad24dc8b3
0b41228 Add detect_virt_windows() vstinner Jul 1, 2026 https://github.com/python/cpython/pull/152824/commits/0b41228383f07181d94c513f83d7d7707cb34690
bb6099d Detect Hyper-V vstinner Jul 1, 2026 https://github.com/python/cpython/pull/152824/commits/bb6099d66893b59e4549385732e6df7286931607
1761ea8 Detect Amazon EC2 vstinner Jul 2, 2026 https://github.com/python/cpython/pull/152824/commits/1761ea855dc48171046df7c6f6e1708defc1de5d
Clear filters https://github.com/python/cpython/pull/152824/files
Please reload this pagehttps://github.com/python/cpython/pull/152824/files
Please reload this pagehttps://github.com/python/cpython/pull/152824/files
Lib/test/pythoninfo.pyhttps://github.com/python/cpython/pull/152824/files#diff-0e1446603335e370275fd0d817c5865d413188c8af49a00c9857bdfd5175a0bd
View file https://github.com/vstinner/cpython/blob/1761ea855dc48171046df7c6f6e1708defc1de5d/Lib/test/pythoninfo.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/152824/{{ revealButtonHref }}
https://github.com/python/cpython/pull/152824/files#diff-0e1446603335e370275fd0d817c5865d413188c8af49a00c9857bdfd5175a0bd
https://github.com/python/cpython/pull/152824/files#diff-0e1446603335e370275fd0d817c5865d413188c8af49a00c9857bdfd5175a0bd
https://github.com/python/cpython/pull/152824/files#diff-0e1446603335e370275fd0d817c5865d413188c8af49a00c9857bdfd5175a0bd
https://github.com/python/cpython/pull/152824/files#diff-0e1446603335e370275fd0d817c5865d413188c8af49a00c9857bdfd5175a0bd
https://github.com/python/cpython/pull/152824/files#diff-0e1446603335e370275fd0d817c5865d413188c8af49a00c9857bdfd5175a0bd
https://github.com/python/cpython/pull/152824/files#diff-0e1446603335e370275fd0d817c5865d413188c8af49a00c9857bdfd5175a0bd
https://github.com/python/cpython/pull/152824/files#diff-0e1446603335e370275fd0d817c5865d413188c8af49a00c9857bdfd5175a0bd
https://github.com/python/cpython/pull/152824/files#diff-0e1446603335e370275fd0d817c5865d413188c8af49a00c9857bdfd5175a0bd
https://github.com/python/cpython/pull/152824/files#diff-0e1446603335e370275fd0d817c5865d413188c8af49a00c9857bdfd5175a0bd
https://github.com/python/cpython/pull/152824/files#diff-0e1446603335e370275fd0d817c5865d413188c8af49a00c9857bdfd5175a0bd
Please reload this pagehttps://github.com/python/cpython/pull/152824/files
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.