GeezerVison is showing github.com — refactor: share PyTime conversions with time.sleep by youknowdot · Pull Request #9362 · RustPython/RustPython
Conversation
youknowdot
commented
Oct 25, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
Share the existing CPython-style PyTime conversion implementation with production time.sleep instead of maintaining the same conversion twice.
- Move the landed numerical helper from
_testinternalcapi/pytime.rs to time/pytime.rs and reuse from_seconds_object(..., Round::Up) in sleep.
- Preserve every conversion body, the existing
_testinternalcapi argument-binding and diagnostics, and the sleep audit, negative-duration rejection, and platform backends.
- No dependency, Lib, test, thread-lifecycle, or public Python API changes. This is a behavior-preserving extraction from Integrate remaining Python 3.15 final runtime and libraries #8954, not a new numeric feature.
Validation
- Locked/offline VM library check: passed.
- Locked/offline strict VM library Clippy: passed.
- Fresh default CLI build: passed.
- Existing
test.test_time.TimeTestCase.test_sleep_exceptions: passed on a fresh, independently sealed binary. This selects only conversion-error and negative-duration cases; no positive sleeps, explicit signal delivery, thread/process creation, or full-module run. Normal interpreter/import initialization is unchanged.
Local validation is based on ef6e2dbaee626e7ea2f24900867fcd4f5aa6ab56. The patch merges cleanly with main b7bebe638c8a44dc2a7ec90cfd6c17912ec88876; its newer memmap2/object dependency graph has not been rebuilt locally and is left to current-merge CI. The full workspace/C-API suites were not run.
Source comparison uses CPython 3.15's object conversion and timeout-rounding contract. The full numerical fixture classes are unavailable on this main baseline; no skipped class is counted as coverage.
AI assistance: OpenAI Codex assisted with the extraction, source review, and validation preparation.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
chatgpt-codex-connector[bot] reacted with eyes emoji
Move the existing conversion helper into the production time module and reuse it from sleep, preserving conversion bodies and internal C-API argument binding.
Assisted-by: OpenAI Codex:model version unavailable
coderabbitai
Bot
commented
Oct 25, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

Caution
Review failed
The pull request is closed.
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
❤️ Share
-
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Merging this PR will improve performance by 11.03%
⚡ 1 improved benchmark
✅ 61 untouched benchmarks
⏩ 4 skipped benchmarks1
Performance Changes
Tip Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.
Comparing youknowdot:cpython315-pytime-production-reuse (f811005) with main (b7bebe6)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Codex Review Summary
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
🔄 Running since 2026-10-26T01:07:49.690385Z |
f811005 |
Draft marked ready |
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|