Repository navigation
Share POSIX IDs and prepare subprocess inputs - #9677
Conversation
Reuse common UID and GID converters for POSIX controls and account lookups. Honor index-enabled arguments, C-long conversion boundaries, and sentinel formatting while preserving lookup allocation errors. Assisted-by: OpenAI Codex:model version not exposed
Bring AsObject into pwd for exception classification and remove the obsolete POSIX PyObject import. Assisted-by: OpenAI Codex:model version not exposed
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Assisted-by: OpenAI Codex: model version not exposed
Match parent-side conversion and validation order while reusing the shared POSIX ID converters. Keep original audit objects, bytes-path lifetimes and live argv list mutation behavior; adapt child descriptors as raw integers without fabricated borrowed lifetimes. Add bounded host-only tests for descriptor errors and owned pipe operations. Assisted-by: OpenAI Codex: model version not exposed
Generate the platform-specific marker through update_lib from repeated exact-head hosted Linux XPASS evidence, preserving expectations for unverified platforms. Assisted-by: dot:frontier-intelligence
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [x] test: cpython/Lib/test/test_sys.py (TODO: 4) dependencies: dependent tests: (250 tests)
Legend:
|
Use scripts/update_lib auto-mark helpers with the exact-head hosted CI results to retire only observed unexpected-success markers. Test bodies, assertions, and platform skips remain unchanged. Assisted-by: OpenAI Codex:model version not exposed
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary
Group the shared POSIX account converters with the subprocess preparation that consumes them.
pwd.getpwuid,grp.getgrgid, and_posixsubprocess, including index-enabled values, C-long overflow behavior, and the -1 sentinel._posixsubprocess.fork_execwith the original executable, argv, and environment objects after native preparation and before fork. Acceptargs=None, distinguish bytes-only executable/environment sequences from filesystem paths, and retain live argv mutation checks and converted bytes lifetimes.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
Remaining scope
Local RustPython runtime and full workspace/C-API suites were not run. Hosted macOS CI subsequently observed
AuditTest.test_posixsubprocesspassing, so its remaining conditional expected-failure marker was retired throughscripts/update_lib. Test bodies are unchanged; Windows skips this test because_posixsubprocessis 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
sysconfis 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.