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 — Align select-family conversion and timeouts by youknowdot · Pull Request #9663 · RustPython/RustPython

Conversation

@youknowdot

@youknowdot youknowdot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Group the related select-family conversion and timeout fixes around the VM's existing signed pytime conversion, rather than maintaining another conversion implementation.

  • Share seconds/milliseconds scaling, index-before-float conversion, signed nanosecond bounds, and timeout rounding. Use checked platform timeval/timespec conversion and monotonic deadlines after descriptor/changelist callbacks.
  • Reuse Fildes and derived raw argument binding. Preserve argument roots and callback/error ordering for select, poll, epoll, and kqueue.
  • Accept all unsigned-short poll event bits, preserve returned high event bits, and report ENOENT for modifying an unregistered descriptor.
  • Use ppoll on Linux/Android for nanosecond precision and waits beyond the signed-millisecond limit; retain checked poll fallback elsewhere and recompute remaining waits after EINTR.
  • Align epoll registration keywords, maxevents checks, closed-state ordering, signed timeout limits, and sub-millisecond negative rounding.

No test or snippet edits. The overlaps with #9652's separate thread-timeout additions and #8954's C-API time helpers were checked by clean three-way compositions of pytime.rs.

Reference

Compared against CPython v3.15.0 Modules/selectmodule.c, its Clinic bindings, and Python/pytime.c.

Validation

  • Focused VM, host_env, and stdlib threading cargo check --offline: passed.
  • Matching strict cargo clippy --offline -- -D warnings: passed.
  • Independent source review, formatting, git diff --check, and normal repository pre-commit hooks: passed.
  • Bounded CPython 3.15 probes covered conversion errors, zero waits, a ready owned pipe with a large timeout, epoll keywords, and POLLRDHUP from an owned socket pair.
  • Native RustPython execution, full workspace/C-API tests, and cross-platform builds were not run under the current task restrictions. Hosted CI remains required.

Platform-specific kqueue, Windows, and 32-bit paths are source-reviewed, not runtime-validated. The pre-existing epoll signal-handler-close locking behavior remains outside this conversion patch. A 32-bit ppoll time_t overflow retains a generic timeout-overflow diagnostic.

AI assistance

OpenAI Codex assisted with source comparison, implementation, review, and validation. The model version is not exposed by this environment.

Sorry, something went wrong.

Uh oh!

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

All reactions
@youknowdot
Align select-family conversion and timeouts
b4eb985
Reuse signed pytime conversion and descriptor/argument binding across select, poll, epoll and kqueue. Preserve conversion order, argument roots, timeout bounds and rounding, and poll event masks. Use ppoll where supported for nanosecond deadlines.

Assisted-by: OpenAI Codex:model version not exposed
@coderabbitai

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • 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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
All reactions

Sorry, something went wrong.

Uh oh!

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

@youknowone

youknowone commented Nov 4, 2026

Copy link
Copy Markdown
Member

todo: need review

All reactions

Sorry, something went wrong.

Uh oh!

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

youknowdot added a commit to youknowdot/RustPython that referenced this pull request Nov 6, 2026
@youknowdot
Consolidate select-family timeout handling
05bc33a
Incorporate RustPython#9663 intact alongside the thread timeout fixes, retaining its commit and attribution.

Assisted-by: OpenAI Codex:model version not exposed
@youknowdot youknowdot mentioned this pull request Nov 6, 2026
Unify signed timeouts across wait APIs #9652
Merged
@youknowdot

youknowdot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Consolidated into #9652 at 8e59835. This original commit is preserved as an ancestor, including descriptor conversion, callback ordering, ppoll precision, and retry-budget handling. The combined branch passed 533 targeted timeout regression tests plus the thread audit test; full aggregate checks and exact-head CI remain pending. Closing this duplicate without deleting its branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@youknowdot youknowdot closed this Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

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.