René's URL Explorer Experiment


Title: Unify signed timeouts across wait APIs by youknowdot · Pull Request #9652 · RustPython/RustPython · GitHub

Open Graph Title: Unify signed timeouts across wait APIs by youknowdot · Pull Request #9652 · RustPython/RustPython

X Title: Unify signed timeouts across wait APIs by youknowdot · Pull Request #9652 · RustPython/RustPython

Description: Summary Consolidate the related thread, select-family, and SimpleQueue timeout fixes in this PR. The full commit histories from #9663 and #9641 are preserved alongside the latest #9652 join-wait fix. Use the VM's shared signed pytime conversion for seconds and milliseconds, with __index__ before __float__, checked nanosecond bounds, and consistent NaN/overflow handling. Remove SimpleQueue's duplicate converter. Preserve each API's policy for None, negative values, nonblocking calls, and indefinite waits. SimpleQueue deliberately uses ceiling rounding; thread and select APIs use away-from-zero rounding. Keep Lock/RLock raw argument binding, callback order, rounded indefinite sentinel, native wait bounds, and checked durations. Keep thread joins within native wait slices without resetting the total timeout budget. Keep select/poll/epoll/kqueue descriptor conversion and callback ordering, monotonic retry budgets, checked platform times, poll event bits, and Linux/Android ppoll precision. Keep SimpleQueue's nonblocking permit consumption and atomic publication of items with permits, plus its truth-testing and timeout validation fixes. Preserve all existing Rust tests and the integer daemon value in thread audit events. The existing update_lib-generated audit marker removal is retained; no test assertions, logic, or data were changed during consolidation. The interpreter-queue binding refactor in #9729 and socket binding work in #9668 remain separate. This branch composes cleanly with #9563 at 832f9bb454; the shared Clinic fix is not included here. Reference CPython 3.15.0 time conversion, thread timeout parsing, thread primitives, SimpleQueue, and select. Validation On consolidated head 8e59835c155b5133e4e3c64f5312f4449b40dacb: SQLite-enabled threaded release build passed. test_time, test_thread, test_threading, test_queue, test_select, test_poll, and test_epoll passed: 533 tests run, 46 skipped. test.test_audit.AuditTest.test_threading passed. A bounded 211-case CPython 3.15.0 comparison had 209 exact matches. The two remaining differences are the existing excess-argument versus unexpected-keyword diagnostics in queue/lock binding, within the scope of the separate shared binder work in #9563. Conversion values, exception types, callback order, rounding, and sentinels matched. The channel regression module was skipped because it requires a GIL-enabled interpreter; this is not runtime channel coverage. Formatting, git diff --check, normal commit hooks, and clean source composition with #9563 passed. Full workspace/C-API tests and strict Clippy are still in progress. Exact-head hosted CI remains pending. Cross-platform kqueue, Windows, and 32-bit runtime behavior has not been locally validated. AI assistance: OpenAI Codex assisted consolidation, source review, and validation. The model version is not exposed. Original commits and attribution are preserved, and new commits include an Assisted-by trailer. Summary by CodeRabbit Bug Fixes Improved timeout handling for thread locks, thread joins, and channel waits. Timeout values are rounded consistently, and negative values or values beyond supported limits are rejected. Nonblocking lock calls now validate timeout values consistently, with conversion errors reported before nonblocking timeout restrictions. Thread lock acquisition and join operations now handle indefinite waits consistently, and long join waits continue reliably across supported wait intervals. Queue and polling operations now handle timeout values more consistently, including correct rounding and platform-limit checks. Polling results preserve the complete event mask, and modifying an unregistered poll descriptor now reports an OS error.

Open Graph Description: Summary Consolidate the related thread, select-family, and SimpleQueue timeout fixes in this PR. The full commit histories from #9663 and #9641 are preserved alongside the latest #9652 join-wait fi...

X Description: Summary Consolidate the related thread, select-family, and SimpleQueue timeout fixes in this PR. The full commit histories from #9663 and #9641 are preserved alongside the latest #9652 join-wait fi...

Opengraph URL: https://github.com/RustPython/RustPython/pull/9652

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,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-controllerpull_requests
route-actionfiles
fetch-noncev2:b76a958d-5cf2-cc98-e2a8-749bd0d9c7aa
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE04E:2DBB21:32024D9:42C2EEE:6B01F37A
html-safe-nonced85bf124b9b9dbcb76c2009a60ee0da4e4afccdd1b15d5335b588b8f2746482e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDRFOjJEQkIyMTozMjAyNEQ5OjQyQzJFRUU6NkIwMUYzN0EiLCJ2aXNpdG9yX2lkIjoiNjUwOTgyNzE2MjkxOTUzMTM4NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac2280672ebff2b5e4f43523c778abdc422ea2db48e8fa4b754f19c8a4440369e4
hovercard-subject-tagpull_request:5143454110
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/RustPython/RustPython/pull/9652/files
twitter:imagehttps://avatars.githubusercontent.com/u/336763669?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/336763669?s=400&v=4
og:image:altSummary Consolidate the related thread, select-family, and SimpleQueue timeout fixes in this PR. The full commit histories from #9663 and #9641 are preserved alongside the latest #9652 join-wait fi...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git
octolytics-dimension-user_id39710557
octolytics-dimension-user_loginRustPython
octolytics-dimension-repository_id135201145
octolytics-dimension-repository_nwoRustPython/RustPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id135201145
octolytics-dimension-repository_network_root_nwoRustPython/RustPython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/RustPython/RustPython/pull/9652/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9652%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9652%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=RustPython%2FRustPython
Reloadhttps://github.com/RustPython/RustPython/pull/9652/files
Reloadhttps://github.com/RustPython/RustPython/pull/9652/files
Reloadhttps://github.com/RustPython/RustPython/pull/9652/files
RustPythonhttps://github.com/RustPython
RustPythonhttps://github.com/RustPython/RustPython
Codehttps://github.com/RustPython/RustPython
Issues195 (195)https://github.com/RustPython/RustPython/issues
Pull requests133 (133)https://github.com/RustPython/RustPython/pulls
Discussionshttps://github.com/RustPython/RustPython/discussions
Actionshttps://github.com/RustPython/RustPython/actions
Projectshttps://github.com/RustPython/RustPython/projects
Wikihttps://github.com/RustPython/RustPython/wiki
Security and qualityhttps://github.com/RustPython/RustPython/security
Insightshttps://github.com/RustPython/RustPython/insights
Sign up for GitHub https://github.com/signup?return_to=%2FRustPython%2FRustPython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FRustPython%2FRustPython%2Fissues%2Fnew%2Fchoose
youknowonehttps://github.com/youknowone
RustPython:mainhttps://github.com/RustPython/RustPython/tree/main
youknowdot:fix/shared-thread-timeouts-20261103https://github.com/youknowdot/RustPython/tree/fix/shared-thread-timeouts-20261103
Conversation 14 https://github.com/RustPython/RustPython/pull/9652
Commits 15 https://github.com/RustPython/RustPython/pull/9652/commits
Checks 28 https://github.com/RustPython/RustPython/pull/9652/checks
Files changed https://github.com/RustPython/RustPython/pull/9652/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9652/files
Unify signed timeouts across wait APIs https://github.com/RustPython/RustPython/pull/9652/files#top
Show all changes 15 commits https://github.com/RustPython/RustPython/pull/9652/files
76cb424 Reuse signed timeout conversion for channels and joins youknowdot Nov 3, 2026 https://github.com/RustPython/RustPython/pull/9652/commits/76cb424fc04d051035498dc29b0ee56207a217c9
793f70c Gate exported timeout bound to threading builds youknowdot Nov 3, 2026 https://github.com/RustPython/RustPython/pull/9652/commits/793f70c174118204d360cde641559724c92d455e
b21a3a4 Reuse signed timeout conversion for lock acquisition youknowdot Nov 3, 2026 https://github.com/RustPython/RustPython/pull/9652/commits/b21a3a4cac14b5b1f5392c3b808c94b34707c5d1
a84d6ff Preserve integer daemon values in joinable thread audits youknowdot Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9652/commits/a84d6ffe892d45b0f46b698a45a35aed8a8bf1d5
f014ac9 Keep timeout tests focused on changed thread behavior youknowdot Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9652/commits/f014ac9b414da2f047ff12d554a2273efa2a1ff4
083d26f Retire passing Linux thread audit expectation youknowdot Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9652/commits/083d26f87c49a5d2619e6936f8ad9c5dcebe6e5d
9592266 Retire the passing thread audit marker codex Nov 6, 2026 https://github.com/RustPython/RustPython/pull/9652/commits/9592266ac4ffa400823c368998f6631fbcbc26fc
e426629 Bound thread join waits without resetting the timeout codex Nov 6, 2026 https://github.com/RustPython/RustPython/pull/9652/commits/e42662985c06baedcd5ecdca3785aabb1fe1ee9b
d4c8334 Align select-family conversion and timeouts youknowdot Nov 3, 2026 https://github.com/RustPython/RustPython/pull/9652/commits/d4c8334b58711f206a6bd3d6b78e4db97bf2e95c
8ca1313 Consume permits for nonblocking SimpleQueue get youknowdot Nov 3, 2026 https://github.com/RustPython/RustPython/pull/9652/commits/8ca13135d57e9eab625f745a8cfb41c5dbc91817
af9ff89 Validate SimpleQueue timeouts without panicking youknowdot Nov 3, 2026 https://github.com/RustPython/RustPython/pull/9652/commits/af9ff89c1ff2c13c2e53c3b03aa8f75e813656bf
698dcfc Use truth testing for SimpleQueue block arguments youknowdot Nov 3, 2026 https://github.com/RustPython/RustPython/pull/9652/commits/698dcfc9516060650181f9aa5aa2c13d7d0c88d5
228ef35 Publish SimpleQueue items and permits together youknowdot Nov 3, 2026 https://github.com/RustPython/RustPython/pull/9652/commits/228ef35fc17e1f67c0f0704c04b2dbc45daa13cb
1699fe7 Reuse shared signed time conversion in SimpleQueue youknowdot Nov 6, 2026 https://github.com/RustPython/RustPython/pull/9652/commits/1699fe75acbd945f0ecf1aedbf5d29eb4fedb76b
8216c33 Rely on scope cleanup for redundant explicit drops codex Nov 6, 2026 https://github.com/RustPython/RustPython/pull/9652/commits/8216c33a983db3c54341d9cd64fa8ef50cbc7725
Clear filters https://github.com/RustPython/RustPython/pull/9652/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9652/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9652/files
test_audit.py https://github.com/RustPython/RustPython/pull/9652/files#diff-9e6a1e498511d9e674d9697d12f4b152dd3539cf13ec953b857ed118a5c57353
select.rs https://github.com/RustPython/RustPython/pull/9652/files#diff-993db34b172322281745543278a8c9e6ed4af2ee8bbf3b05ab795019ed349852
_queue.rs https://github.com/RustPython/RustPython/pull/9652/files#diff-6ba48335be35388d54746ca9f4f5d301fa8eb38c44c9a10bb81faae9efa608aa
select.rs https://github.com/RustPython/RustPython/pull/9652/files#diff-9e541446cb5321da18fb2db4eb334f6d7ec9f0cbdc04b74f120752d19efbb549
_interpchannels.rs https://github.com/RustPython/RustPython/pull/9652/files#diff-fa1c7ca12e67b26d7a0213373d22c85c6aac36a55553bf218393f82ec08f5726
_thread.rs https://github.com/RustPython/RustPython/pull/9652/files#diff-0006354bf5c0b6258c334f326e9c125eae4c55e8dae289a4990e76d7503885cb
time.rs https://github.com/RustPython/RustPython/pull/9652/files#diff-1b1beeed0db11c1262967da108e5e037aed82af263bb55882f24b1556bf8f9a5
pytime.rs https://github.com/RustPython/RustPython/pull/9652/files#diff-3667da9f1ce6014ffe317482a920a9f87268304bbcb1c2886b71a70cc559423d
Lib/test/test_audit.pyhttps://github.com/RustPython/RustPython/pull/9652/files#diff-9e6a1e498511d9e674d9697d12f4b152dd3539cf13ec953b857ed118a5c57353
View file https://github.com/youknowdot/RustPython/blob/8216c33a983db3c54341d9cd64fa8ef50cbc7725/Lib/test/test_audit.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9652/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9652/files#diff-9e6a1e498511d9e674d9697d12f4b152dd3539cf13ec953b857ed118a5c57353
https://github.com/RustPython/RustPython/pull/9652/files#diff-9e6a1e498511d9e674d9697d12f4b152dd3539cf13ec953b857ed118a5c57353
crates/host_env/src/select.rshttps://github.com/RustPython/RustPython/pull/9652/files#diff-993db34b172322281745543278a8c9e6ed4af2ee8bbf3b05ab795019ed349852
View file https://github.com/youknowdot/RustPython/blob/8216c33a983db3c54341d9cd64fa8ef50cbc7725/crates/host_env/src/select.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9652/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9652/files#diff-993db34b172322281745543278a8c9e6ed4af2ee8bbf3b05ab795019ed349852
https://github.com/RustPython/RustPython/pull/9652/files#diff-993db34b172322281745543278a8c9e6ed4af2ee8bbf3b05ab795019ed349852
https://github.com/RustPython/RustPython/pull/9652/files#diff-993db34b172322281745543278a8c9e6ed4af2ee8bbf3b05ab795019ed349852
https://github.com/RustPython/RustPython/pull/9652/files#diff-993db34b172322281745543278a8c9e6ed4af2ee8bbf3b05ab795019ed349852
crates/stdlib/src/_queue.rshttps://github.com/RustPython/RustPython/pull/9652/files#diff-6ba48335be35388d54746ca9f4f5d301fa8eb38c44c9a10bb81faae9efa608aa
View file https://github.com/youknowdot/RustPython/blob/8216c33a983db3c54341d9cd64fa8ef50cbc7725/crates/stdlib/src/_queue.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9652/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9652/files#diff-6ba48335be35388d54746ca9f4f5d301fa8eb38c44c9a10bb81faae9efa608aa
https://github.com/RustPython/RustPython/pull/9652/files#diff-6ba48335be35388d54746ca9f4f5d301fa8eb38c44c9a10bb81faae9efa608aa
https://github.com/RustPython/RustPython/pull/9652/files#diff-6ba48335be35388d54746ca9f4f5d301fa8eb38c44c9a10bb81faae9efa608aa
https://github.com/RustPython/RustPython/pull/9652/files#diff-6ba48335be35388d54746ca9f4f5d301fa8eb38c44c9a10bb81faae9efa608aa
https://github.com/RustPython/RustPython/pull/9652/files#diff-6ba48335be35388d54746ca9f4f5d301fa8eb38c44c9a10bb81faae9efa608aa
https://github.com/RustPython/RustPython/pull/9652/files#diff-6ba48335be35388d54746ca9f4f5d301fa8eb38c44c9a10bb81faae9efa608aa
https://github.com/RustPython/RustPython/pull/9652/files#diff-6ba48335be35388d54746ca9f4f5d301fa8eb38c44c9a10bb81faae9efa608aa
youknowonehttps://github.com/youknowone
Nov 7, 2026https://github.com/RustPython/RustPython/pull/9652/files#r4500903125
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9652/files
https://github.com/RustPython/RustPython/pull/9652/files#diff-6ba48335be35388d54746ca9f4f5d301fa8eb38c44c9a10bb81faae9efa608aa
https://github.com/RustPython/RustPython/pull/9652/files#diff-6ba48335be35388d54746ca9f4f5d301fa8eb38c44c9a10bb81faae9efa608aa
https://github.com/RustPython/RustPython/pull/9652/files#diff-6ba48335be35388d54746ca9f4f5d301fa8eb38c44c9a10bb81faae9efa608aa
https://github.com/RustPython/RustPython/pull/9652/files#diff-6ba48335be35388d54746ca9f4f5d301fa8eb38c44c9a10bb81faae9efa608aa
https://github.com/RustPython/RustPython/pull/9652/files#diff-6ba48335be35388d54746ca9f4f5d301fa8eb38c44c9a10bb81faae9efa608aa
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9652/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9652/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.