Repository navigation
Align POSIX control argument handling with Python 3.15 - #9664
Draft
youknowdot wants to merge 2 commits into
Draft
youknowdot wants to merge 2 commits into
youknowdot wants to merge 2 commits into
Conversation
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
Contributor
Merging this PR will not alter performance
Comparing Footnotes
|
youknowone
reviewed
Nov 6, 2026
| 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
youknowdot
force-pushed
the
fix-posix-control-conversion-order-315
branch
from
November 7, 2026 15:46
3efe056 to
4712df2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.