René's URL Explorer Experiment


Title: gh-149452: os.process_cpu_count() now respects cgroups by itamarst · Pull Request #162510 · python/cpython · GitHub

Open Graph Title: gh-149452: os.process_cpu_count() now respects cgroups by itamarst · Pull Request #162510 · python/cpython

X Title: gh-149452: os.process_cpu_count() now respects cgroups by itamarst · Pull Request #162510 · python/cpython

Description: Fixes #149452 Issue: gh-149452

Open Graph Description: Fixes #149452 Issue: gh-149452

X Description: Fixes #149452 Issue: gh-149452

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.3

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:588cff31-c47b-0de9-16a7-67ed77b890b6
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE8AE:36611F:1119F0F:169C6CC:6B0652B9
html-safe-nonce90eec3b4da31df8923017caede8e1fbb6ccccc48fd6f16caf74027aae7d5e4dc
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOEFFOjM2NjExRjoxMTE5RjBGOjE2OUM2Q0M6NkIwNjUyQjkiLCJ2aXNpdG9yX2lkIjoiNjIyODE4MTEwMDQ4MTg5MzA0OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace4f7e6b01867c6360b40e22779ac103d5ac0edd122938dc4e7eb914bcbc164ed
hovercard-subject-tagpull_request:5462227991
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/162510/files
twitter:imagehttps://avatars.githubusercontent.com/u/3266662?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/3266662?s=400&v=4
og:image:altFixes #149452 Issue: gh-149452
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None6324e6ac990fb6befbec840cc0e102a1071c339bfe8f9826bb12de2e3ba1d297
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
release7f0aa75f4141d440c6110dc31af7ea7797abb6c4
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/162510/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F162510%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F162510%2Ffiles
Sign uphttps://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/162510/files
Reloadhttps://github.com/python/cpython/pull/162510/files
Reloadhttps://github.com/python/cpython/pull/162510/files
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
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
itamarsthttps://github.com/itamarst
python:mainhttps://github.com/python/cpython/tree/main
itamarst:149452-cgroups-process_counthttps://github.com/itamarst/cpython/tree/149452-cgroups-process_count
Conversation 33 https://github.com/python/cpython/pull/162510
Commits 17 https://github.com/python/cpython/pull/162510/commits
Checks 56 https://github.com/python/cpython/pull/162510/checks
Files changed https://github.com/python/cpython/pull/162510/files
Please reload this pagehttps://github.com/python/cpython/pull/162510/files
gh-149452: os.process_cpu_count() now respects cgroups https://github.com/python/cpython/pull/162510/files#top
Show all changes 17 commits https://github.com/python/cpython/pull/162510/files
9cc6993 Preliminary test for respecting cgroups in process_cpu_count() itamarst Nov 23, 2026 https://github.com/python/cpython/pull/162510/commits/9cc699320222512df8ab62e33b3607d3bf8df190
b32eb61 Sketch of cgroups implementation for process_cpu_count() itamarst Nov 23, 2026 https://github.com/python/cpython/pull/162510/commits/b32eb6119233c5255153323b0f885aa14ac2884f
5e5e3f3 Extend testing itamarst Nov 23, 2026 https://github.com/python/cpython/pull/162510/commits/5e5e3f3b26276aa17a233416d93af4aab0017696
4b4fef7 Documentation itamarst Nov 23, 2026 https://github.com/python/cpython/pull/162510/commits/4b4fef767d7dbd0a150809812fc48a013473bbb7
d87dc8f Add changelog entry itamarst Nov 23, 2026 https://github.com/python/cpython/pull/162510/commits/d87dc8f2c45c0de406fb6605f12b3bf73d64a2ba
c087aaa Edits itamarst Nov 23, 2026 https://github.com/python/cpython/pull/162510/commits/c087aaa0c530824e5c510494ce336aed0b19690f
aed27cd Wrap itamarst Nov 23, 2026 https://github.com/python/cpython/pull/162510/commits/aed27cde4cb986e4db95dda5e65cc27d54d8ef03
ca83a22 Apply batched suggestions from code review itamarst Nov 24, 2026 https://github.com/python/cpython/pull/162510/commits/ca83a22fb1027d9dcfd9f9714b5217684bba82ed
e124535 Explicitly return None itamarst Nov 24, 2026 https://github.com/python/cpython/pull/162510/commits/e1245352e7349edb1034e62d8e6cc1acc1cdf2e9
9f63b4d Lazy imports itamarst Nov 24, 2026 https://github.com/python/cpython/pull/162510/commits/9f63b4d6ec569d1690a70a38d5c7e547bb705b35
f07acca Handle return of None from cpu_count(), theoretically possible itamarst Nov 24, 2026 https://github.com/python/cpython/pull/162510/commits/f07acca2df7f42e29d5c731f0a4d1dfa3b295d40
8f1bb3c Add update of change itamarst Nov 24, 2026 https://github.com/python/cpython/pull/162510/commits/8f1bb3c66d9775a8e0eb2ca5aceefe2d1533b996
833fcaf Feature, not fix itamarst Nov 24, 2026 https://github.com/python/cpython/pull/162510/commits/833fcaf0b3de095ae9e403ebb9710cb3e244afe9
5bdfa8a Split into its own function, unit test itamarst Nov 24, 2026 https://github.com/python/cpython/pull/162510/commits/5bdfa8ae77c7b5f3cbfb50ffdc30c648ca73312c
87dd48f Don't call cpu_count() in this function itamarst Nov 24, 2026 https://github.com/python/cpython/pull/162510/commits/87dd48f6bfcd7be6c057f5f3980edf2f6881802c
5b97143 Add tests for missing files, and for parsing /proc/mounts itamarst Nov 24, 2026 https://github.com/python/cpython/pull/162510/commits/5b97143169d8ddd7c94469d0f54d73da3dbf940c
d47c4dc Move some testing out of end-to-end and into direct testing itamarst Nov 24, 2026 https://github.com/python/cpython/pull/162510/commits/d47c4dcf17dc5f9b63be9b0b7262dc2861860445
Clear filters https://github.com/python/cpython/pull/162510/files
Please reload this pagehttps://github.com/python/cpython/pull/162510/files
Please reload this pagehttps://github.com/python/cpython/pull/162510/files
os.rst https://github.com/python/cpython/pull/162510/files#diff-cd9132e5234678864807ae34a75c5d4d6b894b31c327a4d3620fbd0c37eec16e
os.py https://github.com/python/cpython/pull/162510/files#diff-d2e8ad2f4746ac5fb230fa5a7345fd4332c56818489a2246472d38893aa82431
test_os.py https://github.com/python/cpython/pull/162510/files#diff-0c3c0e7d77a166e9089c5ddcc9d2db7c4fab9528044dec1fda4b3a6be569f784
2026-11-23-17-03-23.gh-issue-149452.zKhaUP.rst https://github.com/python/cpython/pull/162510/files#diff-7084481867f4880908254568151319d055598a2c58bd08f4cf4945b753e1927b
Doc/library/os.rsthttps://github.com/python/cpython/pull/162510/files#diff-cd9132e5234678864807ae34a75c5d4d6b894b31c327a4d3620fbd0c37eec16e
View file https://github.com/python/cpython/blob/d47c4dcf17dc5f9b63be9b0b7262dc2861860445/Doc/library/os.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/162510/{{ revealButtonHref }}
https://github.com/python/cpython/pull/162510/files#diff-cd9132e5234678864807ae34a75c5d4d6b894b31c327a4d3620fbd0c37eec16e
Please reload this pagehttps://github.com/python/cpython/pull/162510/files
https://github.com/python/cpython/pull/162510/files#diff-cd9132e5234678864807ae34a75c5d4d6b894b31c327a4d3620fbd0c37eec16e
https://github.com/python/cpython/pull/162510/files#diff-cd9132e5234678864807ae34a75c5d4d6b894b31c327a4d3620fbd0c37eec16e
Lib/os.pyhttps://github.com/python/cpython/pull/162510/files#diff-d2e8ad2f4746ac5fb230fa5a7345fd4332c56818489a2246472d38893aa82431
View file https://github.com/python/cpython/blob/d47c4dcf17dc5f9b63be9b0b7262dc2861860445/Lib/os.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/162510/{{ revealButtonHref }}
https://github.com/python/cpython/pull/162510/files#diff-d2e8ad2f4746ac5fb230fa5a7345fd4332c56818489a2246472d38893aa82431
https://github.com/python/cpython/pull/162510/files#diff-d2e8ad2f4746ac5fb230fa5a7345fd4332c56818489a2246472d38893aa82431
https://github.com/python/cpython/pull/162510/files#diff-d2e8ad2f4746ac5fb230fa5a7345fd4332c56818489a2246472d38893aa82431
vstinnerhttps://github.com/vstinner
Nov 24, 2026https://github.com/python/cpython/pull/162510/files#r4682079041
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/162510/files
itamarsthttps://github.com/itamarst
Nov 24, 2026https://github.com/python/cpython/pull/162510/files#r4682317543
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/162510/files
https://github.com/python/cpython/pull/162510/files#diff-d2e8ad2f4746ac5fb230fa5a7345fd4332c56818489a2246472d38893aa82431
Please reload this pagehttps://github.com/python/cpython/pull/162510/files
Lib/test/test_os/test_os.pyhttps://github.com/python/cpython/pull/162510/files#diff-0c3c0e7d77a166e9089c5ddcc9d2db7c4fab9528044dec1fda4b3a6be569f784
View file https://github.com/python/cpython/blob/d47c4dcf17dc5f9b63be9b0b7262dc2861860445/Lib/test/test_os/test_os.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/162510/{{ revealButtonHref }}
https://github.com/python/cpython/pull/162510/files#diff-0c3c0e7d77a166e9089c5ddcc9d2db7c4fab9528044dec1fda4b3a6be569f784
https://github.com/python/cpython/pull/162510/files#diff-0c3c0e7d77a166e9089c5ddcc9d2db7c4fab9528044dec1fda4b3a6be569f784
https://github.com/python/cpython/pull/162510/files#diff-0c3c0e7d77a166e9089c5ddcc9d2db7c4fab9528044dec1fda4b3a6be569f784
https://github.com/python/cpython/pull/162510/files#diff-0c3c0e7d77a166e9089c5ddcc9d2db7c4fab9528044dec1fda4b3a6be569f784
picnixzhttps://github.com/picnixz
Nov 24, 2026https://github.com/python/cpython/pull/162510/files#r4679482980
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/162510/files
itamarsthttps://github.com/itamarst
Nov 24, 2026https://github.com/python/cpython/pull/162510/files#r4682300056
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
https://www.freedesktop.org/software/systemd/man/latest/systemd.scope.htmlhttps://www.freedesktop.org/software/systemd/man/latest/systemd.scope.html
Please reload this pagehttps://github.com/python/cpython/pull/162510/files
picnixzhttps://github.com/picnixz
Nov 24, 2026https://github.com/python/cpython/pull/162510/files#r4682477693
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/162510/files
itamarsthttps://github.com/itamarst
Nov 24, 2026https://github.com/python/cpython/pull/162510/files#r4683650018
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/162510/files
vstinnerhttps://github.com/vstinner
Nov 24, 2026https://github.com/python/cpython/pull/162510/files#r4684020330
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/162510/files
itamarsthttps://github.com/itamarst
Nov 24, 2026https://github.com/python/cpython/pull/162510/files#r4684965532
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/162510/files
https://github.com/python/cpython/pull/162510/files#diff-0c3c0e7d77a166e9089c5ddcc9d2db7c4fab9528044dec1fda4b3a6be569f784
Misc/NEWS.d/next/Library/2026-11-23-17-03-23.gh-issue-149452.zKhaUP.rsthttps://github.com/python/cpython/pull/162510/files#diff-7084481867f4880908254568151319d055598a2c58bd08f4cf4945b753e1927b
View file https://github.com/python/cpython/blob/d47c4dcf17dc5f9b63be9b0b7262dc2861860445/Misc/NEWS.d/next/Library/2026-11-23-17-03-23.gh-issue-149452.zKhaUP.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/162510/{{ revealButtonHref }}
Please reload this pagehttps://github.com/python/cpython/pull/162510/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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.