Repository navigation
Align faulthandler watchdog timeouts with CPython - #9775
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. |
|
|
||
|
|
||
| # Faulthandler watchdogs use the same signed-nanosecond conversion as sleep. | ||
| import faulthandler |
There was a problem hiding this comment.
this is improper. do not add import faulthandler in stdlib_time. separate stdlib_faulthandler for this
There was a problem hiding this comment.
Moved the timeout and register regression tests into stdlib_faulthandler.py in f88bd7d, leaving stdlib_time.py and stdlib_signal.py unchanged. The dedicated snippet passes on RustPython and CPython 3.15.1.
f88bd7d to
3d437ee
Compare
3d437ee to
4669cb0
Compare
Use the shared signed PyTime conversion and platform bounds, accept timeout/signum keywords, and preserve the watchdog deadline across notifications. Add safe numeric-conversion and notification regression coverage. Assisted-by: OpenAI Codex:model version not exposed
Keep the native-platform guard separate so the tests_outside_test_module Clippy lint recognizes the cfg(test) module. Assisted-by: OpenAI Codex:model version not exposed
Move watchdog timeout and signal-registration probes into stdlib_faulthandler.py, preserving their assertions and guards. Keep the time and signal snippets focused on their own modules. Assisted-by: OpenAI Codex:model version not exposed
4669cb0 to
261911f
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
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
timeout=indump_traceback_laterandsignum=inregister, matching CPython 3.15.pytimehelper after repeat/exit truth conversion. Preserve integer-protocol precedence, float-subclass handling, exception order, microsecond rounding, and native/C-long limits before file lookup.This patch does not change signal callbacks or frame traversal. Existing watchdog
max_threads, file-retention, and cancellation-joining gaps remain outside its scope. It adds no work to the VM execution loop.Validation
test_faulthandler,test_time, andtest_signalpassed: respectively 51/65/57 tests run and 11/19/25 skipped. The affected pytest snippet cases passed.chownEINVAL in this executor, and the default build's missing SQLite feature. CPython 3.15.1 also reproduces the AF_UNIX andchownrestrictions. This is not a full snippet pass.Reference
CPython 3.15.1 faulthandler implementation and Clinic wrappers.
AI assistance: OpenAI Codex assisted implementation, review, and validation. Both commits include an
Assisted-bytrailer.