Repository navigation
Match epoll.modify keyword and eventmask conversion contracts - #9554
Conversation
Bind raw arguments before callbacks and preserve Clinic bitmask warning semantics. 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. CodeRabbit Verify
|
Merging this PR will not alter performance
Comparing Footnotes
|
Codex Review SummaryThis 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
Accept both
fdandeventmaskas positional or keyword arguments toselect.epoll.modify, matching CPython 3.15.0's(self, /, fd, eventmask)signature.Bind raw arguments before calling user code. After argument-shape validation, retain the order: file-descriptor conversion, event-mask
__index__conversion, any range warning, closed-epoll check, existing host operation. The mask uses the low 32 bits; values outside[-2**31, 2**32 - 1]emitDeprecationWarning("integer value out of range")at stack level 1. A warning promoted to an exception returns before the closed check or syscall. No descriptor ownership changes are introduced.This changes only
modify; it is independent of #9553 (unregister) and does not changeregister. The small mask helper is local to select; no shared-converter refactor is included. Existing sharedFildesdifferences, including the missing RuntimeWarning for a direct bool descriptor, are not addressed.Reference
CPython 3.15.0
selectClinic wrapper andPyLong_AsNativeBytes.Validation
git diff --checkpassed.test_epollattempts were blocked before compilation by the unavailableparking_lot_coregit dependency. No local compilation or runtime pass is claimed.Lib/test/test_epoll.pycovers positional modify and closed-epoll behavior. It does not establish new keyword handling, mask boundaries, warning-as-error behavior or callback ordering by execution; those remain runtime validation gaps.Draft pending exact-head CI and its actual
--signaturereport.AI assistance: OpenAI Codex performed source investigation, implementation, metadata-test drafting and review.