René's URL Explorer Experiment


Title: bpo-44547: Make Fractions objects instances of typing.SupportsInt by mdickinson · Pull Request #27851 · python/cpython · GitHub

Open Graph Title: bpo-44547: Make Fractions objects instances of typing.SupportsInt by mdickinson · Pull Request #27851 · python/cpython

X Title: bpo-44547: Make Fractions objects instances of typing.SupportsInt by mdickinson · Pull Request #27851 · python/cpython

Description: This PR adds an __int__ method to fractions.Fraction, so that an isinstance(some_fraction, typing.SupportsInt) check passes. https://bugs.python.org/issue44547

Open Graph Description: This PR adds an __int__ method to fractions.Fraction, so that an isinstance(some_fraction, typing.SupportsInt) check passes. https://bugs.python.org/issue44547

X Description: This PR adds an __int__ method to fractions.Fraction, so that an isinstance(some_fraction, typing.SupportsInt) check passes. https://bugs.python.org/issue44547

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

X: @github

direct link

Domain: github.com

route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:6560ad6a-b2a8-a0b8-8a83-d594216df74a
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD522:393FCF:2410C7:2F95CD:6969BDD7
html-safe-nonce33946534fdb61ed2a0eea8616d3d9ebb3c55ac233dea35a03cfcdc6ae29af15f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTIyOjM5M0ZDRjoyNDEwQzc6MkY5NUNEOjY5NjlCREQ3IiwidmlzaXRvcl9pZCI6Ijg2NDg3NTgzNTI5MjIzNzI3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac20d2a74621aa48083869116ce1e6249497a895bd0d33fd52866661789fcc00b5
hovercard-subject-tagpull_request:716604522
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///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/cpython/27851/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/d29960b9d3b45b0d41440688236cebd294c966870821aa75836309062783788d/python/cpython/pull/27851
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d29960b9d3b45b0d41440688236cebd294c966870821aa75836309062783788d/python/cpython/pull/27851
og:image:altThis PR adds an __int__ method to fractions.Fraction, so that an isinstance(some_fraction, typing.SupportsInt) check passes. https://bugs.python.org/issue44547
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemdickinson
hostnamegithub.com
expected-hostnamegithub.com
Noneacedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056
turbo-cache-controlno-preview
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release83c08c21cdda978090dc44364b71aa5bc6dcea79
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/27851#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F27851
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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/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%2F27851
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%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/27851
Reloadhttps://github.com/python/cpython/pull/27851
Reloadhttps://github.com/python/cpython/pull/27851
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/27851
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k 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.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/27851
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 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
Jump to bottomhttps://github.com/python/cpython/pull/27851#issue-comment-box
ambvhttps://github.com/ambv
python:mainhttps://github.com/python/cpython/tree/main
mdickinson:bpo-44547https://github.com/mdickinson/cpython/tree/bpo-44547
bpo-44547: Make Fractions objects instances of typing.SupportsInt https://github.com/python/cpython/pull/27851#top
ambvhttps://github.com/ambv
python:mainhttps://github.com/python/cpython/tree/main
mdickinson:bpo-44547https://github.com/mdickinson/cpython/tree/bpo-44547
Conversation 15 https://github.com/python/cpython/pull/27851
Commits 6 https://github.com/python/cpython/pull/27851/commits
Checks 0 https://github.com/python/cpython/pull/27851/checks
Files changed https://github.com/python/cpython/pull/27851/files
Please reload this pagehttps://github.com/python/cpython/pull/27851
https://github.co/hiddenchars
https://github.com/python/cpython/pull/{{ revealButtonHref }}
https://github.com/mdickinson
mdickinsonhttps://github.com/mdickinson
Aug 20, 2021https://github.com/python/cpython/pull/27851#issue-975457746
Please reload this pagehttps://github.com/python/cpython/pull/27851
https://bugs.python.org/issue44547https://bugs.python.org/issue44547
Please reload this pagehttps://github.com/python/cpython/pull/27851
https://github.com/mdickinson
bpo-44547: Implement Fractions.__int__https://github.com/python/cpython/pull/27851/commits/673028822fcdbc5aeffc8d671a22645667e47aff
6730288https://github.com/python/cpython/pull/27851/commits/673028822fcdbc5aeffc8d671a22645667e47aff
https://github.com/the-knights-who-say-ni
the-knights-who-say-nihttps://github.com/the-knights-who-say-ni
CLA signed https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22CLA%20signed%22
Aug 20, 2021https://github.com/python/cpython/pull/27851#event-5185932279
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Aug 20, 2021https://github.com/python/cpython/pull/27851#event-5185932393
https://github.com/mdickinson
mdickinsonhttps://github.com/mdickinson
type-feature https://github.com/python/cpython/issues?q=state%3Aopen%20label%3Atype-feature
Aug 20, 2021https://github.com/python/cpython/pull/27851#event-5185933755
https://github.com/serhiy-storchaka
serhiy-storchakahttps://github.com/serhiy-storchaka
Aug 20, 2021 https://github.com/python/cpython/pull/27851#pullrequestreview-734897046
View reviewed changes https://github.com/python/cpython/pull/27851/files/673028822fcdbc5aeffc8d671a22645667e47aff
serhiy-storchakahttps://github.com/serhiy-storchaka
https://github.com/python/cpython/pull/27851#pullrequestreview-734897046
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/27851
https://github.com/mdickinson
mdickinsonhttps://github.com/mdickinson
Aug 20, 2021https://github.com/python/cpython/pull/27851#issuecomment-902605902
Please reload this pagehttps://github.com/python/cpython/pull/27851
https://github.com/mdickinson
mdickinsonhttps://github.com/mdickinson
Aug 20, 2021https://github.com/python/cpython/pull/27851#issuecomment-902650760
Please reload this pagehttps://github.com/python/cpython/pull/27851
https://github.com/mdickinson
mdickinsonhttps://github.com/mdickinson
August 20, 2021 18:13https://github.com/python/cpython/pull/27851#event-5188132438
https://github.com/mdickinson
Test custom integer typeshttps://github.com/python/cpython/pull/27851/commits/bfa14a8a6a5fa75d3a3ff0de9af70b36ac287c94
bfa14a8https://github.com/python/cpython/pull/27851/commits/bfa14a8a6a5fa75d3a3ff0de9af70b36ac287c94
https://github.com/serhiy-storchaka
serhiy-storchakahttps://github.com/serhiy-storchaka
Aug 22, 2021https://github.com/python/cpython/pull/27851#issuecomment-903225431
Please reload this pagehttps://github.com/python/cpython/pull/27851
https://github.com/mdickinson
Fix __int__ to always return an inthttps://github.com/python/cpython/pull/27851/commits/23e8389a0ce59eafe9e45e2617eb9f37dbcb6e89
23e8389https://github.com/python/cpython/pull/27851/commits/23e8389a0ce59eafe9e45e2617eb9f37dbcb6e89
https://github.com/mdickinson
mdickinsonhttps://github.com/mdickinson
Aug 22, 2021https://github.com/python/cpython/pull/27851#issuecomment-903236574
Please reload this pagehttps://github.com/python/cpython/pull/27851
https://github.com/serhiy-storchaka
serhiy-storchakahttps://github.com/serhiy-storchaka
Aug 22, 2021 https://github.com/python/cpython/pull/27851#pullrequestreview-735556387
View reviewed changes https://github.com/python/cpython/pull/27851/files/23e8389a0ce59eafe9e45e2617eb9f37dbcb6e89
Lib/fractions.pyhttps://github.com/python/cpython/pull/27851/files/23e8389a0ce59eafe9e45e2617eb9f37dbcb6e89#diff-f561eb7eb97f832b2698837f52c2c2cf23bdb0b31c69cf1f6aaa560280993316
serhiy-storchakahttps://github.com/serhiy-storchaka
Aug 22, 2021https://github.com/python/cpython/pull/27851#discussion_r693470290
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/27851
mdickinsonhttps://github.com/mdickinson
Aug 22, 2021https://github.com/python/cpython/pull/27851#discussion_r693472115
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/27851
Lib/fractions.pyhttps://github.com/python/cpython/pull/27851/files/23e8389a0ce59eafe9e45e2617eb9f37dbcb6e89#diff-f561eb7eb97f832b2698837f52c2c2cf23bdb0b31c69cf1f6aaa560280993316
serhiy-storchakahttps://github.com/serhiy-storchaka
Aug 22, 2021https://github.com/python/cpython/pull/27851#discussion_r693470493
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/27851
mdickinsonhttps://github.com/mdickinson
Aug 22, 2021https://github.com/python/cpython/pull/27851#discussion_r693472017
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/27851
https://github.com/serhiy-storchaka
serhiy-storchakahttps://github.com/serhiy-storchaka
Aug 22, 2021https://github.com/python/cpython/pull/27851#issuecomment-903238479
Please reload this pagehttps://github.com/python/cpython/pull/27851
https://github.com/mdickinson
mdickinsonhttps://github.com/mdickinson
Aug 22, 2021https://github.com/python/cpython/pull/27851#issuecomment-903239888
Please reload this pagehttps://github.com/python/cpython/pull/27851
https://github.com/mdickinson
mdickinsonhttps://github.com/mdickinson
Aug 22, 2021https://github.com/python/cpython/pull/27851#issuecomment-903241080
Please reload this pagehttps://github.com/python/cpython/pull/27851
mdickinsonhttps://github.com/mdickinson
August 22, 2021 10:40https://github.com/python/cpython/pull/27851#commits-pushed-5cc96f7
https://github.com/mdickinson
Update to use operator.index instead of int for the final conversionhttps://github.com/python/cpython/pull/27851/commits/5cc96f782c9c7c2d16e0ed69ca4e32aa1bf7b995
5cc96f7https://github.com/python/cpython/pull/27851/commits/5cc96f782c9c7c2d16e0ed69ca4e32aa1bf7b995
https://github.com/mdickinson
Remove misleading commenthttps://github.com/python/cpython/pull/27851/commits/12be4a9c23d21a3b97b47d788347218a444b4985
12be4a9https://github.com/python/cpython/pull/27851/commits/12be4a9c23d21a3b97b47d788347218a444b4985
https://github.com/mdickinson
mdickinsonhttps://github.com/mdickinson
August 22, 2021 09:42https://github.com/python/cpython/pull/27851#event-5190652860
https://github.com/mdickinson
mdickinsonhttps://github.com/mdickinson
serhiy-storchakahttps://github.com/serhiy-storchaka
September 9, 2021 07:33https://github.com/python/cpython/pull/27851#event-5276597074
https://github.com/serhiy-storchaka
serhiy-storchakahttps://github.com/serhiy-storchaka
Sep 9, 2021 https://github.com/python/cpython/pull/27851#pullrequestreview-749988745
View reviewed changes https://github.com/python/cpython/pull/27851/files/12be4a9c23d21a3b97b47d788347218a444b4985
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
awaiting merge https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20merge%22
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Sep 9, 2021https://github.com/python/cpython/pull/27851#event-5276624891
https://github.com/serhiy-storchaka
serhiy-storchakahttps://github.com/serhiy-storchaka
Sep 9, 2021https://github.com/python/cpython/pull/27851#issuecomment-915842610
Please reload this pagehttps://github.com/python/cpython/pull/27851
https://github.com/serhiy-storchaka
serhiy-storchakahttps://github.com/serhiy-storchaka
Sep 9, 2021https://github.com/python/cpython/pull/27851#issuecomment-915843685
Please reload this pagehttps://github.com/python/cpython/pull/27851
https://github.com/ambv
ambvhttps://github.com/ambv
Oct 21, 2021https://github.com/python/cpython/pull/27851#issuecomment-948990868
Please reload this pagehttps://github.com/python/cpython/pull/27851
https://github.com/ambv
Document the changehttps://github.com/python/cpython/pull/27851/commits/e568382e0a2dc45eb7d0ff50572883d8e2d77fa4
e568382https://github.com/python/cpython/pull/27851/commits/e568382e0a2dc45eb7d0ff50572883d8e2d77fa4
https://github.com/serhiy-storchaka
serhiy-storchakahttps://github.com/serhiy-storchaka
Oct 21, 2021 https://github.com/python/cpython/pull/27851#pullrequestreview-786224969
View reviewed changes https://github.com/python/cpython/pull/27851/files/e568382e0a2dc45eb7d0ff50572883d8e2d77fa4
https://github.com/ambv
ambvhttps://github.com/ambv
d1b2477https://github.com/python/cpython/commit/d1b24775b462f4f28aa4929fd031899170793388
Oct 21, 2021https://github.com/python/cpython/pull/27851#event-5501416013
https://github.com/bedevere-bot
bedevere-bothttps://github.com/bedevere-bot
awaiting merge https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20merge%22
Oct 21, 2021https://github.com/python/cpython/pull/27851#event-5501416119
https://github.com/python/cpython/pull/27851
mamrheinhttps://github.com/python/cpython/pull/27851
May 3, 2022 https://github.com/python/cpython/pull/27851#ref-issue-1199061123
fraction.Fraction does not implement __int__. #88713 https://github.com/python/cpython/issues/88713
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F27851
https://github.com/serhiy-storchaka
serhiy-storchaka https://github.com/serhiy-storchaka
https://github.com/python/cpython/pull/27851/files/e568382e0a2dc45eb7d0ff50572883d8e2d77fa4
type-feature https://github.com/python/cpython/issues?q=state%3Aopen%20label%3Atype-feature
Please reload this pagehttps://github.com/python/cpython/pull/27851
https://github.com/mdickinson
https://github.com/serhiy-storchaka
https://github.com/ambv
https://github.com/the-knights-who-say-ni
https://github.com/bedevere-bot
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.