René's URL Explorer Experiment


Title: gh-67795: Improve precision of non-float timestamp and timeout arguments by serhiy-storchaka · Pull Request #139273 · python/cpython · GitHub

Open Graph Title: gh-67795: Improve precision of non-float timestamp and timeout arguments by serhiy-storchaka · Pull Request #139273 · python/cpython

X Title: gh-67795: Improve precision of non-float timestamp and timeout arguments by serhiy-storchaka · Pull Request #139273 · python/cpython

Description: Use the as_integer_ratio() or the numerator and denominator attributes to represent the number as an integer ratio and perform scaling and rounding exactly. This allows to avoid the precision loss and double rounding error due to conversion to float. Issue: gh-67795 📚 Documentation preview 📚: https://cpython-previews--139273.org.readthedocs.build/

Open Graph Description: Use the as_integer_ratio() or the numerator and denominator attributes to represent the number as an integer ratio and perform scaling and rounding exactly. This allows to avoid the precision loss ...

X Description: Use the as_integer_ratio() or the numerator and denominator attributes to represent the number as an integer ratio and perform scaling and rounding exactly. This allows to avoid the precision loss ...

Opengraph URL: https://github.com/python/cpython/pull/139273

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:9c0a77d3-5aff-3929-39b5-82859fc53f0c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE4A4:108F59:3CB195C:56B0FE5:6A4FE28D
html-safe-nonce79bb2102a24b42c31bab2ba5249936d5688d80f73d56bc75e09fdaf912600e37
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNEE0OjEwOEY1OTozQ0IxOTVDOjU2QjBGRTU6NkE0RkUyOEQiLCJ2aXNpdG9yX2lkIjoiMjE0MzY1MTUyOTYzODI3MzY3NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaccebc130e38c49dc59e1fe1484e537169c09d5835d3561bd5e6cd7cfbe9292f3b
hovercard-subject-tagpull_request:2854281549
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/python/cpython/pull/139273/files
twitter:imagehttps://avatars.githubusercontent.com/u/3659035?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/3659035?s=400&v=4
og:image:altUse the as_integer_ratio() or the numerator and denominator attributes to represent the number as an integer ratio and perform scaling and rounding exactly. This allows to avoid the precision loss ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None19b98c3d9767bb8a56238a89ff8401d1cbdf3bc5c353799aacf49fe6c76b4b7c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
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
release142593e66413bbae27fd485859993597d5a3b104
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/139273/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F139273%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F139273%2Ffiles
Sign up https://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=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/139273/files
Reloadhttps://github.com/python/cpython/pull/139273/files
Reloadhttps://github.com/python/cpython/pull/139273/files
Please reload this pagehttps://github.com/python/cpython/pull/139273/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/139273/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 34.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.6k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
serhiy-storchakahttps://github.com/serhiy-storchaka
python:mainhttps://github.com/python/cpython/tree/main
serhiy-storchaka:timestamp-timeout-as-integer-ratiohttps://github.com/serhiy-storchaka/cpython/tree/timestamp-timeout-as-integer-ratio
Conversation 5 https://github.com/python/cpython/pull/139273
Commits 5 https://github.com/python/cpython/pull/139273/commits
Checks 51 https://github.com/python/cpython/pull/139273/checks
Files changed https://github.com/python/cpython/pull/139273/files
Please reload this pagehttps://github.com/python/cpython/pull/139273/files
gh-67795: Improve precision of non-float timestamp and timeout arguments https://github.com/python/cpython/pull/139273/files#top
Show all changes 5 commits https://github.com/python/cpython/pull/139273/files
90f8bf2 gh-67795: Improve precision of non-float timestamp and timeout arguments serhiy-storchaka Sep 23, 2025 https://github.com/python/cpython/pull/139273/commits/90f8bf2916a872ecdb046642949db6f8fa30d35a
68433af Apply suggestions from code review serhiy-storchaka Oct 3, 2025 https://github.com/python/cpython/pull/139273/commits/68433af3a29b75d6ecef5c1cf1ce838fe6250f14
937be4c Add more comments. serhiy-storchaka Oct 3, 2025 https://github.com/python/cpython/pull/139273/commits/937be4ce3aedc1decc72051bdd03412da3dcf708
6be1856 Merge branch 'main' into timestamp-timeout-as-integer-ratio serhiy-storchaka May 4, 2026 https://github.com/python/cpython/pull/139273/commits/6be18568b8fbe708040cd107312ac77b7c40e25e
a93adbd Replace _PyTime_FromLong with PyLong_AsInt64. serhiy-storchaka May 4, 2026 https://github.com/python/cpython/pull/139273/commits/a93adbda757bc8c0af852067216de29aadd97957
Clear filters https://github.com/python/cpython/pull/139273/files
Please reload this pagehttps://github.com/python/cpython/pull/139273/files
Please reload this pagehttps://github.com/python/cpython/pull/139273/files
3.15.rst https://github.com/python/cpython/pull/139273/files#diff-bd7a9c5b54eeb2b40e6db5e48e8d79d309d8738e776a40918773c6840189edf9
pycore_global_objects_fini_generated.h https://github.com/python/cpython/pull/139273/files#diff-31f682b2a04cda997f449a9816ee5fae305e3bfa7357afcb794615921c6a88d2
pycore_global_strings.h https://github.com/python/cpython/pull/139273/files#diff-7656e411eccd63ff8aab3e11de3f45035665f6b639206d3f440727dfb5e0ebcf
pycore_runtime_init_generated.h https://github.com/python/cpython/pull/139273/files#diff-69a1fc720f0b1e9005cf7717dd81c823399da81dd2f6480664b51238c1ef93f0
pycore_unicodeobject_generated.h https://github.com/python/cpython/pull/139273/files#diff-510f6084b63d39305481b719ae0a29475ba759e259a8e4cee4f07c451ffbb2d6
_pydatetime.py https://github.com/python/cpython/pull/139273/files#diff-5dc97b7989952636b0cd6224bc01469715753358d6e2a9059707f0d06f83b141
datetimetester.py https://github.com/python/cpython/pull/139273/files#diff-917d5d1d1423993f37a643afa9f2a2f9caa3c0f91e06c0d7ebea1b879d53b4ef
test_os.py https://github.com/python/cpython/pull/139273/files#diff-0c3c0e7d77a166e9089c5ddcc9d2db7c4fab9528044dec1fda4b3a6be569f784
2026-05-04-20-10-04.gh-issue-67795.v9wb5q.rst https://github.com/python/cpython/pull/139273/files#diff-56d5ce72f34e9f4425e3ff3ae27ac685d941eb692332fd781c0aa4fa8382944a
pytime.c https://github.com/python/cpython/pull/139273/files#diff-e8cf16f37d4d1aa0e011d0088545b7e225f969b2c29e2d5133bb8c3ff506670c
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L116
Doc/whatsnew/3.15.rsthttps://github.com/python/cpython/pull/139273/files#diff-bd7a9c5b54eeb2b40e6db5e48e8d79d309d8738e776a40918773c6840189edf9
View file https://github.com/python/cpython/blob/a93adbda757bc8c0af852067216de29aadd97957/Doc/whatsnew/3.15.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/139273/{{ revealButtonHref }}
https://github.com/python/cpython/pull/139273/files#diff-bd7a9c5b54eeb2b40e6db5e48e8d79d309d8738e776a40918773c6840189edf9
https://github.com/python/cpython/pull/139273/files#diff-bd7a9c5b54eeb2b40e6db5e48e8d79d309d8738e776a40918773c6840189edf9
Include/internal/pycore_global_objects_fini_generated.hhttps://github.com/python/cpython/pull/139273/files#diff-31f682b2a04cda997f449a9816ee5fae305e3bfa7357afcb794615921c6a88d2
View file https://github.com/python/cpython/blob/a93adbda757bc8c0af852067216de29aadd97957/Include/internal/pycore_global_objects_fini_generated.h
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/python/cpython/pull/139273/files
Include/internal/pycore_global_strings.hhttps://github.com/python/cpython/pull/139273/files#diff-7656e411eccd63ff8aab3e11de3f45035665f6b639206d3f440727dfb5e0ebcf
View file https://github.com/python/cpython/blob/a93adbda757bc8c0af852067216de29aadd97957/Include/internal/pycore_global_strings.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/139273/{{ revealButtonHref }}
https://github.com/python/cpython/pull/139273/files#diff-7656e411eccd63ff8aab3e11de3f45035665f6b639206d3f440727dfb5e0ebcf
https://github.com/python/cpython/pull/139273/files#diff-7656e411eccd63ff8aab3e11de3f45035665f6b639206d3f440727dfb5e0ebcf
https://github.com/python/cpython/pull/139273/files#diff-7656e411eccd63ff8aab3e11de3f45035665f6b639206d3f440727dfb5e0ebcf
https://github.com/python/cpython/pull/139273/files#diff-7656e411eccd63ff8aab3e11de3f45035665f6b639206d3f440727dfb5e0ebcf
Include/internal/pycore_runtime_init_generated.hhttps://github.com/python/cpython/pull/139273/files#diff-69a1fc720f0b1e9005cf7717dd81c823399da81dd2f6480664b51238c1ef93f0
View file https://github.com/python/cpython/blob/a93adbda757bc8c0af852067216de29aadd97957/Include/internal/pycore_runtime_init_generated.h
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/python/cpython/pull/139273/files
Include/internal/pycore_unicodeobject_generated.hhttps://github.com/python/cpython/pull/139273/files#diff-510f6084b63d39305481b719ae0a29475ba759e259a8e4cee4f07c451ffbb2d6
View file https://github.com/python/cpython/blob/a93adbda757bc8c0af852067216de29aadd97957/Include/internal/pycore_unicodeobject_generated.h
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/python/cpython/pull/139273/files
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L436
Lib/_pydatetime.pyhttps://github.com/python/cpython/pull/139273/files#diff-5dc97b7989952636b0cd6224bc01469715753358d6e2a9059707f0d06f83b141
View file https://github.com/python/cpython/blob/a93adbda757bc8c0af852067216de29aadd97957/Lib/_pydatetime.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/139273/{{ revealButtonHref }}
https://github.com/python/cpython/pull/139273/files#diff-5dc97b7989952636b0cd6224bc01469715753358d6e2a9059707f0d06f83b141
https://github.com/python/cpython/pull/139273/files#diff-5dc97b7989952636b0cd6224bc01469715753358d6e2a9059707f0d06f83b141
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L437
Lib/test/datetimetester.pyhttps://github.com/python/cpython/pull/139273/files#diff-917d5d1d1423993f37a643afa9f2a2f9caa3c0f91e06c0d7ebea1b879d53b4ef
View file https://github.com/python/cpython/blob/a93adbda757bc8c0af852067216de29aadd97957/Lib/test/datetimetester.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/139273/{{ revealButtonHref }}
https://github.com/python/cpython/pull/139273/files#diff-917d5d1d1423993f37a643afa9f2a2f9caa3c0f91e06c0d7ebea1b879d53b4ef
https://github.com/python/cpython/pull/139273/files#diff-917d5d1d1423993f37a643afa9f2a2f9caa3c0f91e06c0d7ebea1b879d53b4ef
https://github.com/python/cpython/pull/139273/files#diff-917d5d1d1423993f37a643afa9f2a2f9caa3c0f91e06c0d7ebea1b879d53b4ef
https://github.com/python/cpython/pull/139273/files#diff-917d5d1d1423993f37a643afa9f2a2f9caa3c0f91e06c0d7ebea1b879d53b4ef
https://github.com/python/cpython/pull/139273/files#diff-917d5d1d1423993f37a643afa9f2a2f9caa3c0f91e06c0d7ebea1b879d53b4ef
https://github.com/python/cpython/pull/139273/files#diff-917d5d1d1423993f37a643afa9f2a2f9caa3c0f91e06c0d7ebea1b879d53b4ef
Lib/test/test_os/test_os.pyhttps://github.com/python/cpython/pull/139273/files#diff-0c3c0e7d77a166e9089c5ddcc9d2db7c4fab9528044dec1fda4b3a6be569f784
View file https://github.com/python/cpython/blob/a93adbda757bc8c0af852067216de29aadd97957/Lib/test/test_os/test_os.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/139273/{{ revealButtonHref }}
https://github.com/python/cpython/pull/139273/files#diff-0c3c0e7d77a166e9089c5ddcc9d2db7c4fab9528044dec1fda4b3a6be569f784
https://github.com/python/cpython/pull/139273/files#diff-0c3c0e7d77a166e9089c5ddcc9d2db7c4fab9528044dec1fda4b3a6be569f784
Misc/NEWS.d/next/Library/2026-05-04-20-10-04.gh-issue-67795.v9wb5q.rsthttps://github.com/python/cpython/pull/139273/files#diff-56d5ce72f34e9f4425e3ff3ae27ac685d941eb692332fd781c0aa4fa8382944a
View file https://github.com/python/cpython/blob/a93adbda757bc8c0af852067216de29aadd97957/Misc/NEWS.d/next/Library/2026-05-04-20-10-04.gh-issue-67795.v9wb5q.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/139273/{{ revealButtonHref }}
Please reload this pagehttps://github.com/python/cpython/pull/139273/files
Please reload this pagehttps://github.com/python/cpython/pull/139273/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.