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: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.

Open Graph Description: Fixes #149452 Issue: os.process_cpu_count() should take cgroups CPU limitations into account (on Linux) #149452

X Description: Fixes #149452 Issue: os.process_cpu_count() should take cgroups CPU limitations into account (on Linux) #149452

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.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/commits(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:1d55a68e-24ab-792f-1c8b-5be22e79303b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB634:174DE2:ECEEC7:13CDC49:6B064EAE
html-safe-nonceddc83f782b00a98b645477ae02ff3908de1121112f09ccb30d4e136ff2cc19de
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjM0OjE3NERFMjpFQ0VFQzc6MTNDREM0OTo2QjA2NEVBRSIsInZpc2l0b3JfaWQiOiIxNjg4NTE0MjI3NTQ1MTk4MjU0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac35e7d325575ab5899ee56376796e74154f465abc9923a88ebf1ff1ade99ee832
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/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/162510/commits
twitter:imagehttps://opengraph.githubassets.com/c7a99855cadcc6f376b54d59d10dd422cb616cdb2fb51fb7bcd2a777472e89f7/python/cpython/pull/162510
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c7a99855cadcc6f376b54d59d10dd422cb616cdb2fb51fb7bcd2a777472e89f7/python/cpython/pull/162510
og:image:altFixes #149452 Issue: os.process_cpu_count() should take cgroups CPU limitations into account (on Linux) #149452
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameitamarst
hostnamegithub.com
expected-hostnamegithub.com
None772b6997ca4daa0428dd49a25d76052e765555ae560fe9c88517eb828bbd861e
turbo-cache-controlno-cache
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-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef1f9a08f7c769a37f1dfc18ad43d463c222a7eea
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/python/cpython/pull/162510/commits#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F162510%2Fcommits
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%2Fcommits
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%2Fcommits&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/162510/commits
Reloadhttps://github.com/python/cpython/pull/162510/commits
Reloadhttps://github.com/python/cpython/pull/162510/commits
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
https://github.com/python/cpython
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
Conversationhttps://github.com/python/cpython/pull/162510
Commits17 (17)https://github.com/python/cpython/pull/162510/commits
Checkshttps://github.com/python/cpython/pull/162510/checks
Files changedhttps://github.com/python/cpython/pull/162510/files
gh-149452: os.process_cpu_count() now respects cgroupshttps://github.com/python/cpython/pull/162510/commits#top
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
Preliminary test for respecting cgroups in process_cpu_count()https://github.com/python/cpython/pull/162510/commits/9cc699320222512df8ab62e33b3607d3bf8df190
https://github.com/itamarst
itamarsthttps://github.com/python/cpython/commits?author=itamarst
9cc6993https://github.com/python/cpython/pull/162510/commits/9cc699320222512df8ab62e33b3607d3bf8df190
https://github.com/python/cpython/tree/9cc699320222512df8ab62e33b3607d3bf8df190
Sketch of cgroups implementation for process_cpu_count()https://github.com/python/cpython/pull/162510/commits/b32eb6119233c5255153323b0f885aa14ac2884f
https://github.com/itamarst
itamarsthttps://github.com/python/cpython/commits?author=itamarst
b32eb61https://github.com/python/cpython/pull/162510/commits/b32eb6119233c5255153323b0f885aa14ac2884f
https://github.com/python/cpython/tree/b32eb6119233c5255153323b0f885aa14ac2884f
Extend testinghttps://github.com/python/cpython/pull/162510/commits/5e5e3f3b26276aa17a233416d93af4aab0017696
https://github.com/itamarst
itamarsthttps://github.com/python/cpython/commits?author=itamarst
5e5e3f3https://github.com/python/cpython/pull/162510/commits/5e5e3f3b26276aa17a233416d93af4aab0017696
https://github.com/python/cpython/tree/5e5e3f3b26276aa17a233416d93af4aab0017696
Documentationhttps://github.com/python/cpython/pull/162510/commits/4b4fef767d7dbd0a150809812fc48a013473bbb7
https://github.com/itamarst
itamarsthttps://github.com/python/cpython/commits?author=itamarst
4b4fef7https://github.com/python/cpython/pull/162510/commits/4b4fef767d7dbd0a150809812fc48a013473bbb7
https://github.com/python/cpython/tree/4b4fef767d7dbd0a150809812fc48a013473bbb7
Add changelog entryhttps://github.com/python/cpython/pull/162510/commits/d87dc8f2c45c0de406fb6605f12b3bf73d64a2ba
https://github.com/itamarst
itamarsthttps://github.com/python/cpython/commits?author=itamarst
d87dc8fhttps://github.com/python/cpython/pull/162510/commits/d87dc8f2c45c0de406fb6605f12b3bf73d64a2ba
https://github.com/python/cpython/tree/d87dc8f2c45c0de406fb6605f12b3bf73d64a2ba
Editshttps://github.com/python/cpython/pull/162510/commits/c087aaa0c530824e5c510494ce336aed0b19690f
https://github.com/itamarst
itamarsthttps://github.com/python/cpython/commits?author=itamarst
c087aaahttps://github.com/python/cpython/pull/162510/commits/c087aaa0c530824e5c510494ce336aed0b19690f
https://github.com/python/cpython/tree/c087aaa0c530824e5c510494ce336aed0b19690f
Wraphttps://github.com/python/cpython/pull/162510/commits/aed27cde4cb986e4db95dda5e65cc27d54d8ef03
https://github.com/itamarst
itamarsthttps://github.com/python/cpython/commits?author=itamarst
aed27cdhttps://github.com/python/cpython/pull/162510/commits/aed27cde4cb986e4db95dda5e65cc27d54d8ef03
https://github.com/python/cpython/tree/aed27cde4cb986e4db95dda5e65cc27d54d8ef03
Apply batched suggestions from code reviewhttps://github.com/python/cpython/pull/162510/commits/ca83a22fb1027d9dcfd9f9714b5217684bba82ed
itamarsthttps://github.com/python/cpython/commits?author=itamarst
vstinnerhttps://github.com/python/cpython/commits?author=vstinner
ca83a22https://github.com/python/cpython/pull/162510/commits/ca83a22fb1027d9dcfd9f9714b5217684bba82ed
https://github.com/python/cpython/tree/ca83a22fb1027d9dcfd9f9714b5217684bba82ed
Explicitly return Nonehttps://github.com/python/cpython/pull/162510/commits/e1245352e7349edb1034e62d8e6cc1acc1cdf2e9
https://github.com/itamarst
itamarsthttps://github.com/python/cpython/commits?author=itamarst
e124535https://github.com/python/cpython/pull/162510/commits/e1245352e7349edb1034e62d8e6cc1acc1cdf2e9
https://github.com/python/cpython/tree/e1245352e7349edb1034e62d8e6cc1acc1cdf2e9
Lazy importshttps://github.com/python/cpython/pull/162510/commits/9f63b4d6ec569d1690a70a38d5c7e547bb705b35
https://github.com/itamarst
itamarsthttps://github.com/python/cpython/commits?author=itamarst
9f63b4dhttps://github.com/python/cpython/pull/162510/commits/9f63b4d6ec569d1690a70a38d5c7e547bb705b35
https://github.com/python/cpython/tree/9f63b4d6ec569d1690a70a38d5c7e547bb705b35
Handle return of None from cpu_count(), theoretically possiblehttps://github.com/python/cpython/pull/162510/commits/f07acca2df7f42e29d5c731f0a4d1dfa3b295d40
https://github.com/itamarst
itamarsthttps://github.com/python/cpython/commits?author=itamarst
f07accahttps://github.com/python/cpython/pull/162510/commits/f07acca2df7f42e29d5c731f0a4d1dfa3b295d40
https://github.com/python/cpython/tree/f07acca2df7f42e29d5c731f0a4d1dfa3b295d40
Add update of changehttps://github.com/python/cpython/pull/162510/commits/8f1bb3c66d9775a8e0eb2ca5aceefe2d1533b996
https://github.com/itamarst
itamarsthttps://github.com/python/cpython/commits?author=itamarst
8f1bb3chttps://github.com/python/cpython/pull/162510/commits/8f1bb3c66d9775a8e0eb2ca5aceefe2d1533b996
https://github.com/python/cpython/tree/8f1bb3c66d9775a8e0eb2ca5aceefe2d1533b996
Feature, not fixhttps://github.com/python/cpython/pull/162510/commits/833fcaf0b3de095ae9e403ebb9710cb3e244afe9
https://github.com/itamarst
itamarsthttps://github.com/python/cpython/commits?author=itamarst
833fcafhttps://github.com/python/cpython/pull/162510/commits/833fcaf0b3de095ae9e403ebb9710cb3e244afe9
https://github.com/python/cpython/tree/833fcaf0b3de095ae9e403ebb9710cb3e244afe9
Split into its own function, unit testhttps://github.com/python/cpython/pull/162510/commits/5bdfa8ae77c7b5f3cbfb50ffdc30c648ca73312c
https://github.com/itamarst
itamarsthttps://github.com/python/cpython/commits?author=itamarst
5bdfa8ahttps://github.com/python/cpython/pull/162510/commits/5bdfa8ae77c7b5f3cbfb50ffdc30c648ca73312c
https://github.com/python/cpython/tree/5bdfa8ae77c7b5f3cbfb50ffdc30c648ca73312c
Don't call cpu_count() in this functionhttps://github.com/python/cpython/pull/162510/commits/87dd48f6bfcd7be6c057f5f3980edf2f6881802c
https://github.com/itamarst
itamarsthttps://github.com/python/cpython/commits?author=itamarst
87dd48fhttps://github.com/python/cpython/pull/162510/commits/87dd48f6bfcd7be6c057f5f3980edf2f6881802c
https://github.com/python/cpython/tree/87dd48f6bfcd7be6c057f5f3980edf2f6881802c
Add tests for missing files, and for parsing /proc/mountshttps://github.com/python/cpython/pull/162510/commits/5b97143169d8ddd7c94469d0f54d73da3dbf940c
https://github.com/itamarst
itamarsthttps://github.com/python/cpython/commits?author=itamarst
5b97143https://github.com/python/cpython/pull/162510/commits/5b97143169d8ddd7c94469d0f54d73da3dbf940c
https://github.com/python/cpython/tree/5b97143169d8ddd7c94469d0f54d73da3dbf940c
Move some testing out of end-to-end and into direct testinghttps://github.com/python/cpython/pull/162510/commits/d47c4dcf17dc5f9b63be9b0b7262dc2861860445
https://github.com/itamarst
itamarsthttps://github.com/python/cpython/commits?author=itamarst
d47c4dchttps://github.com/python/cpython/pull/162510/commits/d47c4dcf17dc5f9b63be9b0b7262dc2861860445
https://github.com/python/cpython/tree/d47c4dcf17dc5f9b63be9b0b7262dc2861860445
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.