Title: Align select-family conversion and timeouts by youknowdot · Pull Request #9663 · RustPython/RustPython · GitHub
Open Graph Title: Align select-family conversion and timeouts by youknowdot · Pull Request #9663 · RustPython/RustPython
X Title: Align select-family conversion and timeouts by youknowdot · Pull Request #9663 · RustPython/RustPython
Description: 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.
Open Graph Description: 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...
X Description: 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 sec...
Opengraph URL: https://github.com/RustPython/RustPython/pull/9663
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:d7b33133-3d75-4806-2c57-bbcd323e1160 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DB16:1087D4:2F52CEB:3F403D8:6B01E6BE |
| html-safe-nonce | 1d90d6a94160efdcd7b97c6f830c150f1be0f3addc618d27d84b328848c0063a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjE2OjEwODdENDoyRjUyQ0VCOjNGNDAzRDg6NkIwMUU2QkUiLCJ2aXNpdG9yX2lkIjoiMTUzMDcxNjY5OTU5MzEzOTkwMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 65ae71f88a334244d7d3b1a9917d7f25c35eb81ec2a7a2788bede5466216c7c0 |
| hovercard-subject-tag | pull_request:5145524052 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/RustPython/RustPython/pull/9663/files |
| twitter:image | https://avatars.githubusercontent.com/u/336763669?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/336763669?s=400&v=4 |
| og:image:alt | 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... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width