Repository navigation
Align POSIX control argument handling with Python 3.15 - #9664
youknowone merged 2 commits into
Conversation
|
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. |
Merging this PR will not alter performance
Comparing Footnotes
|
| struct FcntlArg { | ||
| #[pyarg(positional, default = 0)] | ||
| arg: Either<ArgStrOrBytesLike, ArgIndex>, | ||
| arg: PyObjectRef, |
Preserve fcntl and ioctl protocol precedence, unsigned warnings, buffer lifetimes and guards. Align lockf and termios conversion order, native narrowing, and return values using existing argument binding and host helpers. Assisted-by: OpenAI Codex:model version not exposed
Widen BSD-family c_short lock constants to the shared c_int result while retaining checked flock-field conversion. Assisted-by: OpenAI Codex:model version not exposed
3efe056 to
4712df2
Compare
Codex Review Summary: ✅ CompletedThis 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. |
Summary
Align the related fcntl/termios control argument paths with CPython 3.15 while reusing typed/derived binding and existing buffer/descriptor helpers.
Only four production Rust files changed; no tests or snippets edited. Existing primitive integer conversion remains in use, so this does not introduce another per-function FuncArgs parser or duplicate shared argument machinery.
Reference
Compared against CPython v3.15.0
Modules/fcntlmodule.c,Modules/termios.c, their generated Clinic bindings, andPython/getargs.c.Validation
Validated against base
0bdba72ff9a3ce7187798bb77ee6b5384481259c. Before publication, main advanced to0b081b0283987c7b2d79327dd481f403d515580bwith only unrelated Windows winreg changes (#9589). The four-file patch is identical against that newer main; the newer main was not locally rebuilt.cargo check --offline: passed.cargo clippy --offline -- -D warnings: passed.git diff --check, and normal repository pre-commit hooks: passed.Generic C-int/C-long overflow diagnostic wording is unchanged. Platform-specific native layouts were reviewed in source but not exercised outside Linux.
AI assistance
OpenAI Codex assisted with source comparison, implementation, review, and validation. The model version is not exposed by this environment.