René's URL Explorer Experiment


Title: Share POSIX IDs and prepare subprocess inputs by youknowdot · Pull Request #9677 · RustPython/RustPython · GitHub

Open Graph Title: Share POSIX IDs and prepare subprocess inputs by youknowdot · Pull Request #9677 · RustPython/RustPython

X Title: Share POSIX IDs and prepare subprocess inputs by youknowdot · Pull Request #9677 · RustPython/RustPython

Description: Summary Group the shared POSIX account converters with the subprocess preparation that consumes them. Reuse UID/GID conversion for POSIX controls, pwd.getpwuid, grp.getgrgid, and _posixsubprocess, including index-enabled values, C-long overflow behavior, and the -1 sentinel. Match subprocess scalar-binding and parent-preparation order: preexec restrictions, error-pipe and sorted-descriptor validation, executable/argv/environment/cwd conversion, groups, IDs, then audit. Emit _posixsubprocess.fork_exec with the original executable, argv, and environment objects after native preparation and before fork. Accept args=None, distinguish bytes-only executable/environment sequences from filesystem paths, and retain live argv mutation checks and converted bytes lifetimes. Keep user descriptors as raw integers rather than inventing BorrowedFd<'static> validity. Typed host APIs share the same implementation; child syscall order, credential order, and error-pipe serialization remain unchanged. References: CPython 3.15.0 _posixsubprocess, Clinic binding, ID converters, pwd, and grp. Validation Focused stdlib build and strict all-target VM/host-env/stdlib Clippy with threading passed. Four native host tests passed: invalid descriptor errors, early setup rejection, raw/borrowed keep-list agreement, and isolated owned-pipe inheritance/write/dup behavior. These tests do not fork, exec, run a VM, change credentials, or redirect standard streams. Normal repository commit hooks, rustfmt, and whitespace checks passed. Independent source review covered callback/error order, list mutation, bytes-subclass lifetime, audit identity, pointer lifetime, and raw-FD syscall order. CPython-only reference probes were intercepted by an audit hook before fork. Remaining scope Local RustPython runtime and full workspace/C-API suites were not run. Hosted macOS CI subsequently observed AuditTest.test_posixsubprocess passing, so its remaining conditional expected-failure marker was retired through scripts/update_lib. Test bodies are unchanged; Windows skips this test because _posixsubprocess is unavailable. Fresh CI must validate the updated head. The compile-time extra-group cap is supplied for Linux GNU, macOS, FreeBSD, and NetBSD. Other targets retain their existing uncapped preparation; runtime sysconf is not substituted for CPython's header constant. Existing preexec GC/fork callbacks and child algorithms are outside this patch. The shared iterable collector's partial-result destruction order when iteration itself fails is also unchanged. AI assistance: OpenAI Codex performed source comparison, implementation, reference probes, validation, and independent source review; model version was not exposed.

Open Graph Description: Summary Group the shared POSIX account converters with the subprocess preparation that consumes them. Reuse UID/GID conversion for POSIX controls, pwd.getpwuid, grp.getgrgid, and _posixsubprocess,...

X Description: Summary Group the shared POSIX account converters with the subprocess preparation that consumes them. Reuse UID/GID conversion for POSIX controls, pwd.getpwuid, grp.getgrgid, and _posixsubprocess,...

Opengraph URL: https://github.com/RustPython/RustPython/pull/9677

X: @github

direct link

Domain: github.com

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:791be4f2-c6eb-b80b-15bd-9b98ab683884
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC52E:AFBD9:15BEE7E:1CB8FF7:6B01FE60
html-safe-nonce35799a7a52ebd2ff537103820761cd8805f1fc2d7d275ba3d1bda6bf43fa8099
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTJFOkFGQkQ5OjE1QkVFN0U6MUNCOEZGNzo2QjAxRkU2MCIsInZpc2l0b3JfaWQiOiIxNTgwNTQ2NTMyMjA0MjE1OTA0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac8c83d687790dbeb0947540531d98976415130c5840c45a0e01c4a9f64cb55ffd
hovercard-subject-tagpull_request:5146297673
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/RustPython/RustPython/pull/9677/files
twitter:imagehttps://avatars.githubusercontent.com/u/336763669?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/336763669?s=400&v=4
og:image:altSummary Group the shared POSIX account converters with the subprocess preparation that consumes them. Reuse UID/GID conversion for POSIX controls, pwd.getpwuid, grp.getgrgid, and _posixsubprocess,...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git
octolytics-dimension-user_id39710557
octolytics-dimension-user_loginRustPython
octolytics-dimension-repository_id135201145
octolytics-dimension-repository_nwoRustPython/RustPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id135201145
octolytics-dimension-repository_network_root_nwoRustPython/RustPython
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
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/RustPython/RustPython/pull/9677/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9677%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%2FRustPython%2FRustPython%2Fpull%2F9677%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=RustPython%2FRustPython
Reloadhttps://github.com/RustPython/RustPython/pull/9677/files
Reloadhttps://github.com/RustPython/RustPython/pull/9677/files
Reloadhttps://github.com/RustPython/RustPython/pull/9677/files
RustPythonhttps://github.com/RustPython
RustPythonhttps://github.com/RustPython/RustPython
Codehttps://github.com/RustPython/RustPython
Issues195 (195)https://github.com/RustPython/RustPython/issues
Pull requests133 (133)https://github.com/RustPython/RustPython/pulls
Discussionshttps://github.com/RustPython/RustPython/discussions
Actionshttps://github.com/RustPython/RustPython/actions
Projectshttps://github.com/RustPython/RustPython/projects
Wikihttps://github.com/RustPython/RustPython/wiki
Security and qualityhttps://github.com/RustPython/RustPython/security
Insightshttps://github.com/RustPython/RustPython/insights
Sign up for GitHub https://github.com/signup?return_to=%2FRustPython%2FRustPython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FRustPython%2FRustPython%2Fissues%2Fnew%2Fchoose
youknowonehttps://github.com/youknowone
RustPython:mainhttps://github.com/RustPython/RustPython/tree/main
youknowdot:account-id-conversion-group-20261103https://github.com/youknowdot/RustPython/tree/account-id-conversion-group-20261103
Conversation 4 https://github.com/RustPython/RustPython/pull/9677
Commits 6 https://github.com/RustPython/RustPython/pull/9677/commits
Checks 28 https://github.com/RustPython/RustPython/pull/9677/checks
Files changed https://github.com/RustPython/RustPython/pull/9677/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9677/files
Share POSIX IDs and prepare subprocess inputs https://github.com/RustPython/RustPython/pull/9677/files#top
Show all changes 6 commits https://github.com/RustPython/RustPython/pull/9677/files
52961c5 Share POSIX account ID conversion youknowdot Nov 3, 2026 https://github.com/RustPython/RustPython/pull/9677/commits/52961c53f6cafa8b08e9a83ed7afb22263a1780e
ee725a7 Correct shared account converter imports youknowdot Nov 3, 2026 https://github.com/RustPython/RustPython/pull/9677/commits/ee725a7fa09b8eef8ad4a6088106e3e233081548
31be0cc Merge current main before subprocess preparation youknowdot Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9677/commits/31be0cc4fa42d99ea974ea71215eee277111cffc
5c88522 Prepare POSIX subprocess inputs before audit and fork youknowdot Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9677/commits/5c8852281ac13bcd6101cfa4d776d916f41d9111
c8abe3b Retire the passing Linux subprocess audit expectation youknowdot Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9677/commits/c8abe3bbb7de9ae7780d0ab4103be4890a13022f
4e37958 Retire the passing subprocess audit marker codex Nov 6, 2026 https://github.com/RustPython/RustPython/pull/9677/commits/4e3795861a23c6b077d1d1b803c5a8727ab31b30
Clear filters https://github.com/RustPython/RustPython/pull/9677/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9677/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9677/files
test_audit.py https://github.com/RustPython/RustPython/pull/9677/files#diff-9e6a1e498511d9e674d9697d12f4b152dd3539cf13ec953b857ed118a5c57353
posix.rs https://github.com/RustPython/RustPython/pull/9677/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
grp.rs https://github.com/RustPython/RustPython/pull/9677/files#diff-eedbb58546fe7495149151d7e13c69402b128c556ba0d4608b2d7995e59f04e0
posixsubprocess.rs https://github.com/RustPython/RustPython/pull/9677/files#diff-ffc478979882e8b87bfdd84f21c5c9c76b15724558f0418c239b6864eea7e53e
posix.rs https://github.com/RustPython/RustPython/pull/9677/files#diff-8a094b07fd40ee7a3b9e440782ded748539a5214c242b6b3438421fe0d616c6e
pwd.rs https://github.com/RustPython/RustPython/pull/9677/files#diff-e74cec96d46633b2deca98e65446788064ba2f3157d697c237345c6b8ceb247f
Lib/test/test_audit.pyhttps://github.com/RustPython/RustPython/pull/9677/files#diff-9e6a1e498511d9e674d9697d12f4b152dd3539cf13ec953b857ed118a5c57353
View file https://github.com/youknowdot/RustPython/blob/4e3795861a23c6b077d1d1b803c5a8727ab31b30/Lib/test/test_audit.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9677/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9677/files#diff-9e6a1e498511d9e674d9697d12f4b152dd3539cf13ec953b857ed118a5c57353
https://github.com/RustPython/RustPython/pull/9677/files#diff-9e6a1e498511d9e674d9697d12f4b152dd3539cf13ec953b857ed118a5c57353
crates/host_env/src/posix.rshttps://github.com/RustPython/RustPython/pull/9677/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
View file https://github.com/youknowdot/RustPython/blob/4e3795861a23c6b077d1d1b803c5a8727ab31b30/crates/host_env/src/posix.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9677/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9677/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
https://github.com/RustPython/RustPython/pull/9677/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
https://github.com/RustPython/RustPython/pull/9677/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
https://github.com/RustPython/RustPython/pull/9677/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
https://github.com/RustPython/RustPython/pull/9677/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
https://github.com/RustPython/RustPython/pull/9677/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
https://github.com/RustPython/RustPython/pull/9677/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
https://github.com/RustPython/RustPython/pull/9677/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
https://github.com/RustPython/RustPython/pull/9677/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
https://github.com/RustPython/RustPython/pull/9677/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
https://github.com/RustPython/RustPython/pull/9677/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
https://github.com/RustPython/RustPython/pull/9677/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
https://github.com/RustPython/RustPython/pull/9677/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
https://github.com/RustPython/RustPython/pull/9677/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
https://github.com/RustPython/RustPython/pull/9677/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
https://github.com/RustPython/RustPython/pull/9677/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
https://github.com/RustPython/RustPython/pull/9677/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
https://github.com/RustPython/RustPython/pull/9677/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
https://github.com/RustPython/RustPython/pull/9677/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
https://github.com/RustPython/RustPython/pull/9677/files#diff-c4d8d17cd194261af90a2541465d39d6a285b66572131399a8690bd4c7bd599a
crates/stdlib/src/grp.rshttps://github.com/RustPython/RustPython/pull/9677/files#diff-eedbb58546fe7495149151d7e13c69402b128c556ba0d4608b2d7995e59f04e0
View file https://github.com/youknowdot/RustPython/blob/4e3795861a23c6b077d1d1b803c5a8727ab31b30/crates/stdlib/src/grp.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9677/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9677/files#diff-eedbb58546fe7495149151d7e13c69402b128c556ba0d4608b2d7995e59f04e0
https://github.com/RustPython/RustPython/pull/9677/files#diff-eedbb58546fe7495149151d7e13c69402b128c556ba0d4608b2d7995e59f04e0
https://github.com/RustPython/RustPython/pull/9677/files#diff-eedbb58546fe7495149151d7e13c69402b128c556ba0d4608b2d7995e59f04e0
https://github.com/RustPython/RustPython/pull/9677/files#diff-eedbb58546fe7495149151d7e13c69402b128c556ba0d4608b2d7995e59f04e0
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9677/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9677/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.