GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor: share PyTime conversions with time.sleep by youknowdot · Pull Request #9362 · RustPython/RustPython

Conversation

@youknowdot

@youknowdot youknowdot commented Oct 25, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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
All reactions
  • 👀 1 reaction
@youknowdot
refactor: share PyTime conversions with time.sleep
f811005
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

coderabbitai Bot commented Oct 25, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • 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
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@codspeed

codspeed Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will improve performance by 11.03%

⚡ 1 improved benchmark
✅ 61 untouched benchmarks
⏩ 4 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ rustpython[comprehension_list.py] 889.1 µs 800.8 µs +11.03%

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)

Open in CodSpeed

Footnotes

  1. 4 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@youknowdot youknowdot mentioned this pull request Oct 25, 2026
Integrate remaining Python 3.15 final runtime and libraries #8954
Draft
youknowone
youknowone approved these changes Oct 26, 2026
View reviewed changes
@youknowone
youknowone marked this pull request as ready for review October 26, 2026 01:07
@youknowone
youknowone merged commit 1170a33 into RustPython:main Oct 26, 2026
31 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026

Copy link
Copy Markdown

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@youknowone youknowone youknowone approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

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.

2 participants

@youknowdot @youknowone
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.