Repository navigation
Declare nullable argument defaults directly - #9560
Conversation
Declare fifteen concrete argument defaults directly across compression, array, binascii, process helpers, epoll and match methods. Keep bool conversion and argument release at their current body locations, acquired buffer cleanup order, mkfifo path-before-fd conversion, and existing signed bound semantics. Preserve symbolic, callback-sensitive and stateful omission defaults. No tests, assertions or Lib files changed. Source-reviewed against CPython 3.15.0 d220409a13b77de7a6c30abe16ea90db01528edc; native validation remains limited by the available dependency closure. Assisted-by: OpenAI Codex:model version not exposed
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Restore runtime defaults whose concrete literal lowering adds Python object creation, conversion, or reference management on omitted arguments. Keep only cost-preserving None default cleanup, where applicable. No test code or expectations changed. Assisted-by: OpenAI Codex:model version not exposed
| _exc_value: OptionalArg, | ||
| #[pyarg(positional, optional, name = "exc_tb", py_default = "None")] | ||
| _exc_tb: OptionalArg, | ||
| #[pyarg(positional, default = None, name = "exc_type")] |
There was a problem hiding this comment.
when name is not given, prefix single _ must be auto removed
Use the signature names as the Rust field names so explicit name attributes are redundant. Match the existing multiprocessing ExitArgs dead-code annotation for intentionally ignored context-manager arguments; keep the function body and argument lifetimes unchanged. Assisted-by: OpenAI Codex:model version not exposed
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. |
Head branch was pushed to by a user without write access
04317ac to
1fddea5
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
The nullable match default no longer uses OptionalArg. Remove the stale import so Clippy with -Dwarnings passes; no runtime or test changes. Assisted-by: OpenAI Codex:model version not exposed
Summary
Declare six nullable argument defaults directly in four Rust files:
mkfifo.dir_fdpidfd_send_signal.siginfogroups/groupdictdefaultThese use
Option<PyObjectRef>withdefault = None. Omission remains a native absent state, with existing lazy None fallbacks retained. Rendered signatures are unchanged; typed None metadata replaces Raw metadata. The existing path, file-descriptor conversion and warning order remain intact. The three epoll exit fields now use their signature names directly, removing redundantnameattributes while keeping the ignored owning argument and its drop timing unchanged.The earlier nine non-None changes have been restored: two compression max lengths, array start, four binascii canonical flags, recursive, and mkfifo mode. Their original native or Missing paths avoid Python default-object construction and conversion. In particular, the current derive implementation does not recognize the
PySsizealias as a primitive integer, so changing its defaults here would add boxing and reconversion.CPython 3.15 source pin: d220409a13b77de7a6c30abe16ea90db01528edc. References: mkfifo, signal, match defaults, epoll exit.
Validation
04317ac07270288efbb81b8efda97446d95aa32c.test_os,test_epoll,test_signalandtest_rewere attempted offline. All stopped before compilation because the pinnedparking_lot_coregit dependency is unavailable locally. No local native test pass is claimed.1fddea5f30be3b846023c9fc6c7ec2da18f9c235is in progress. The previous run for04317ac07270288efbb81b8efda97446d95aa32cwas cancelled after the author-only rewrite; both heads have identical source trees. The current head's full CI results remain pending.AI-assisted implementation and review with OpenAI Codex; model version not exposed.
Summary by CodeRabbit
pidfd_send_signalnow raises aTypeErrorwhensiginfois explicitly provided asNone; omitting the argument continues to use its default. Only an omittedsiginfois accepted, while any explicitly supplied value is rejected. No other user-visible behavior changes are noted in this update.