Repository navigation
Match remaining native signatures and watchdog thread limits - #9808
Conversation
Reuse connection parameter metadata without changing custom factory forwarding, expose SQLite and sendmsg defaults from their argument declarations, and enforce the watchdog max_threads option. Assisted-by: Codex:unreported
|
Caution Review failedThe pull request is closed. Pre-merge checks:
|
Address the review by keeping faulthandler coverage in its own snippet. Preserve the existing regression body and restore stdlib_time.py to its original contents. Assisted-by: Codex:unreported
Merging this PR will not alter performance
Comparing Footnotes
|
CI uses CPython 3.15.0, whose sendmsg metadata still contains unrepresentable defaults and cannot be parsed by inspect. Assert that older metadata and ValueError explicitly while retaining the existing exact checks for RustPython and CPython 3.15.1. Assisted-by: Codex:unreported
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
Address five API paths not covered by the open signature PRs, based directly on main
4242849852:socket.sendmsgdefaults andaddressfrom its argument declaration.adapt's protocol default andbackup's0.25spelling.sqlite3.connect, preserving CPython's custom-factory forwarding, including missing or duplicate database arguments, unknown keywords, and unconverted values. The adapter moves the original arguments without binding or copying them again.max_threads: negative caps truncate immediately, zero uses 100, positive caps limit emitted threads, and an exact count does not add an ellipsis.No raw-text override is introduced. Existing #9758 handles Clinic line wrapping. #9775 independently corrects timeout keyword acceptance. When combining these branches, preserve both sets of tests in the newly added
stdlib_faulthandler.py(an add/add conflict) and addmax_threads: 100to #9775'sWatchdogStateunit-test initializer.Inventory
A fresh CPython 3.15.1 comparison of 16,227 observed API paths on Linux found 109 raw-signature differences with default features and 112 with
sqlite. Additional RustPython signatures where CPython has none are allowed and excluded from those counts.Existing PRs cover 105 of the 112 paths: #9758 (61 layout differences), #9756 (24 legacy groups/CSV), #9763 (14 interpreter functions), #9773 (four legacy signatures), and #9551 (two
sched_parampaths).This patch changes the five remaining socket/SQLite/watchdog paths. It also exposes Connection's signature through the reused metadata, an allowed additional signature. On this independent branch, exact raw differences decrease 112 to 110:
sendmsgandadaptbecome exact;connect/backupstill need #9758's wrapping, and the watchdog still needs #9775's keyword correction plus wrapping. No observed paths are added or removed.The two uncovered APIs after those PRs are combined are
faulthandler.enableandregister. They need signal-safe multi-thread dumping, andenableadditionally needs a safe native C-stack path. Accepting ignored options or calling the allocation-based normal C-stack helper from a signal handler would not implement those APIs correctly.Validation
-D warnings.SendmsgUDPTest,SendmsgTCPTest) passed: 24 tests. The broader socket suite retains the baseline sandbox failures.test_sqlite3 test_faulthandler test_time test_inspect: all four files passed, 1,009 tests run, 92 skipped.extra_testswith CPython 3.15.1 and the matching debug implementation: 494 passed, 19 failed, 15 subtests passed. All 19 failure IDs reproduce using the main4242849852SQLite-enabled binary: restricted multiprocessing/socket/chown operations and existing CPython snippet/test-runner failures. This is not a full-suite pass.Review follow-up (
370de1e849): moved the watchdog regression unchanged fromstdlib_time.pyintostdlib_faulthandler.py. The time snippet now exactly matches main. Workspace/C-API tests and both strict Clippy checks were rerun successfully, and all 19 full-suite failure IDs were freshly reproduced with the main SQLite-enabled binary.CI follow-up (
002c447f4e): CI pins CPython 3.15.0, whosesendmsgmetadata still has<unrepresentable>defaults and raisesValueErrorininspect.signature. Assert that exact older metadata separately while retaining the existing RustPython/CPython 3.15.1 checks. This is independent of #9758 line wrapping and changes no runtime code. Workspace/C-API tests and both strict Clippy checks were rerun successfully for this follow-up; independent review also passed the signature snippet on all three interpreters. The failure reproduces before the fix and passes afterward with CPython 3.15.0. Fullextra_testswith that version: 497 passed, 16 failed, 15 subtests passed; all 16 failures reproduce with the main4242849852SQLite-enabled binary.Hosted CI for
002c447f4epassed, including Linux/macOS/Windows snippets, Rust tests, Clippy, Miri, WASI, and cross-target checks. All 26 reported checks succeeded; the optional base/head/CPython comparison was skipped. The branch remains a draft.AI assistance
Implementation, comparison with CPython, and validation were assisted by Codex.