René's URL Explorer Experiment


Title: gh-49766: Make date-datetime comparison more symmetric and flexible by serhiy-storchaka · Pull Request #114760 · python/cpython · GitHub

Open Graph Title: gh-49766: Make date-datetime comparison more symmetric and flexible by serhiy-storchaka · Pull Request #114760 · python/cpython

X Title: gh-49766: Make date-datetime comparison more symmetric and flexible by serhiy-storchaka · Pull Request #114760 · python/cpython

Description: Now the special comparison methods like __eq__ and __lt__ return NotImplemented if one of comparands is date and other is datetime instead of ignoring the time part and the time zone or forcefully return "not equal" or raise TypeError. It makes comparison of date and datetime subclasses more symmetric and allows to change the default behavior by overriding the special comparison methods in subclasses. It is now the same as if date and datetime was independent classes. Issue: gh-49766

Open Graph Description: Now the special comparison methods like __eq__ and __lt__ return NotImplemented if one of comparands is date and other is datetime instead of ignoring the time part and the time zone or forcefully ...

X Description: Now the special comparison methods like __eq__ and __lt__ return NotImplemented if one of comparands is date and other is datetime instead of ignoring the time part and the time zone or forcefully ...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:cf34491c-c162-882e-2465-9179c9b7f5d5
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD336:5105D:4705769:635DAE0:6A4F73C3
html-safe-noncea1a6a885d6fe9f49080c3e667cc557a86082d0f37de595c5bb8be045f36e2267
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzM2OjUxMDVEOjQ3MDU3Njk6NjM1REFFMDo2QTRGNzNDMyIsInZpc2l0b3JfaWQiOiIzNzc3MzM3OTA3OTg5MTQ4NjExIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac6a54cc8e05f5ec06a749b8bcd986461c4120a05241d3d09ae72b211d7c40e41a
hovercard-subject-tagpull_request:1702813579
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/114760/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:altNow the special comparison methods like __eq__ and __lt__ return NotImplemented if one of comparands is date and other is datetime instead of ignoring the time part and the time zone or forcefully ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9
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
release4b249b445842943ed31549e027f57a8ade9881ed
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/114760/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F114760%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%2F114760%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/114760/files
Reloadhttps://github.com/python/cpython/pull/114760/files
Reloadhttps://github.com/python/cpython/pull/114760/files
Please reload this pagehttps://github.com/python/cpython/pull/114760/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/114760/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 34.8k 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:date-datetime-comparisonhttps://github.com/serhiy-storchaka/cpython/tree/date-datetime-comparison
Conversation 1 https://github.com/python/cpython/pull/114760
Commits 9 https://github.com/python/cpython/pull/114760/commits
Checks 0 https://github.com/python/cpython/pull/114760/checks
Files changed https://github.com/python/cpython/pull/114760/files
Please reload this pagehttps://github.com/python/cpython/pull/114760/files
gh-49766: Make date-datetime comparison more symmetric and flexible https://github.com/python/cpython/pull/114760/files#top
Show all changes 9 commits https://github.com/python/cpython/pull/114760/files
e7287b3 gh-49766: Make date-datetime comparison more symmetric and flexible serhiy-storchaka Jan 30, 2024 https://github.com/python/cpython/pull/114760/commits/e7287b366177be48a9030dcdcd88fd872aa35d56
604ea30 Merge branch 'main' into date-datetime-comparison serhiy-storchaka Feb 2, 2024 https://github.com/python/cpython/pull/114760/commits/604ea3014cd39a5d83264026974c773791944679
f534d9e Update documentation. serhiy-storchaka Feb 2, 2024 https://github.com/python/cpython/pull/114760/commits/f534d9e79529f4750f642708ac1639d3d6004da9
ecc8c4c Clean up. serhiy-storchaka Feb 2, 2024 https://github.com/python/cpython/pull/114760/commits/ecc8c4c32492a5d4dc914de772e23ddbd5b64f92
a23a7ef Fix the clean-up. serhiy-storchaka Feb 2, 2024 https://github.com/python/cpython/pull/114760/commits/a23a7ef18494204bc55e9ae931320a2201cec06c
f40d266 Merge branch 'main' into date-datetime-comparison serhiy-storchaka Feb 2, 2024 https://github.com/python/cpython/pull/114760/commits/f40d2666d6f7eadd5dc8a6223fb2c479d0e77755
fd383ab Merge branch 'main' into date-datetime-comparison serhiy-storchaka Feb 5, 2024 https://github.com/python/cpython/pull/114760/commits/fd383abe3630ab76b7604f1e4c360d5b387568a7
463252b Normalize indentation for patchcheck. serhiy-storchaka Feb 6, 2024 https://github.com/python/cpython/pull/114760/commits/463252bb7f46e809bf1978e1ff3c761d520c1a0a
d68cc3d Merge branch 'main' into date-datetime-comparison serhiy-storchaka Feb 6, 2024 https://github.com/python/cpython/pull/114760/commits/d68cc3dff1e4992f6f9e5ad9084e05c6fae9aa2b
Clear filters https://github.com/python/cpython/pull/114760/files
Please reload this pagehttps://github.com/python/cpython/pull/114760/files
Please reload this pagehttps://github.com/python/cpython/pull/114760/files
datetime.rst https://github.com/python/cpython/pull/114760/files#diff-591e6aa401ebcd90f71f28b517b3d4437ba293920787df9ed06e037af0b07175
_pydatetime.py https://github.com/python/cpython/pull/114760/files#diff-5dc97b7989952636b0cd6224bc01469715753358d6e2a9059707f0d06f83b141
datetimetester.py https://github.com/python/cpython/pull/114760/files#diff-917d5d1d1423993f37a643afa9f2a2f9caa3c0f91e06c0d7ebea1b879d53b4ef
2024-01-30-22-10-50.gh-issue-49766.yulJL_.rst https://github.com/python/cpython/pull/114760/files#diff-a34bcbe0eea2e3f9cbd14e4e90146641dc39d7ab8b7c8bffeeeab03103b62067
_datetimemodule.c https://github.com/python/cpython/pull/114760/files#diff-3ee250e3806e884518fd872e9148baf532de6ec54c1cdb4e7679fbb2869d9c47
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L429
Doc/library/datetime.rsthttps://github.com/python/cpython/pull/114760/files#diff-591e6aa401ebcd90f71f28b517b3d4437ba293920787df9ed06e037af0b07175
View file https://github.com/serhiy-storchaka/cpython/blob/d68cc3dff1e4992f6f9e5ad9084e05c6fae9aa2b/Doc/library/datetime.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/114760/{{ revealButtonHref }}
https://github.com/python/cpython/pull/114760/files#diff-591e6aa401ebcd90f71f28b517b3d4437ba293920787df9ed06e037af0b07175
https://github.com/python/cpython/pull/114760/files#diff-591e6aa401ebcd90f71f28b517b3d4437ba293920787df9ed06e037af0b07175
https://github.com/python/cpython/pull/114760/files#diff-591e6aa401ebcd90f71f28b517b3d4437ba293920787df9ed06e037af0b07175
https://github.com/python/cpython/pull/114760/files#diff-591e6aa401ebcd90f71f28b517b3d4437ba293920787df9ed06e037af0b07175
https://github.com/python/cpython/pull/114760/files#diff-591e6aa401ebcd90f71f28b517b3d4437ba293920787df9ed06e037af0b07175
https://github.com/python/cpython/pull/114760/files#diff-591e6aa401ebcd90f71f28b517b3d4437ba293920787df9ed06e037af0b07175
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L436
Lib/_pydatetime.pyhttps://github.com/python/cpython/pull/114760/files#diff-5dc97b7989952636b0cd6224bc01469715753358d6e2a9059707f0d06f83b141
View file https://github.com/serhiy-storchaka/cpython/blob/d68cc3dff1e4992f6f9e5ad9084e05c6fae9aa2b/Lib/_pydatetime.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/114760/{{ revealButtonHref }}
https://github.com/python/cpython/pull/114760/files#diff-5dc97b7989952636b0cd6224bc01469715753358d6e2a9059707f0d06f83b141
https://github.com/python/cpython/pull/114760/files#diff-5dc97b7989952636b0cd6224bc01469715753358d6e2a9059707f0d06f83b141
https://github.com/python/cpython/pull/114760/files#diff-5dc97b7989952636b0cd6224bc01469715753358d6e2a9059707f0d06f83b141
https://github.com/python/cpython/pull/114760/files#diff-5dc97b7989952636b0cd6224bc01469715753358d6e2a9059707f0d06f83b141
https://github.com/python/cpython/pull/114760/files#diff-5dc97b7989952636b0cd6224bc01469715753358d6e2a9059707f0d06f83b141
https://github.com/python/cpython/pull/114760/files#diff-5dc97b7989952636b0cd6224bc01469715753358d6e2a9059707f0d06f83b141
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L437
Lib/test/datetimetester.pyhttps://github.com/python/cpython/pull/114760/files#diff-917d5d1d1423993f37a643afa9f2a2f9caa3c0f91e06c0d7ebea1b879d53b4ef
View file https://github.com/serhiy-storchaka/cpython/blob/d68cc3dff1e4992f6f9e5ad9084e05c6fae9aa2b/Lib/test/datetimetester.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/114760/{{ revealButtonHref }}
https://github.com/python/cpython/pull/114760/files#diff-917d5d1d1423993f37a643afa9f2a2f9caa3c0f91e06c0d7ebea1b879d53b4ef
https://github.com/python/cpython/pull/114760/files#diff-917d5d1d1423993f37a643afa9f2a2f9caa3c0f91e06c0d7ebea1b879d53b4ef
Misc/NEWS.d/next/Library/2024-01-30-22-10-50.gh-issue-49766.yulJL_.rsthttps://github.com/python/cpython/pull/114760/files#diff-a34bcbe0eea2e3f9cbd14e4e90146641dc39d7ab8b7c8bffeeeab03103b62067
View file https://github.com/serhiy-storchaka/cpython/blob/d68cc3dff1e4992f6f9e5ad9084e05c6fae9aa2b/Misc/NEWS.d/next/Library/2024-01-30-22-10-50.gh-issue-49766.yulJL_.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/114760/{{ revealButtonHref }}
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L440
Modules/_datetimemodule.chttps://github.com/python/cpython/pull/114760/files#diff-3ee250e3806e884518fd872e9148baf532de6ec54c1cdb4e7679fbb2869d9c47
View file https://github.com/serhiy-storchaka/cpython/blob/d68cc3dff1e4992f6f9e5ad9084e05c6fae9aa2b/Modules/_datetimemodule.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/114760/{{ revealButtonHref }}
https://github.com/python/cpython/pull/114760/files#diff-3ee250e3806e884518fd872e9148baf532de6ec54c1cdb4e7679fbb2869d9c47
https://github.com/python/cpython/pull/114760/files#diff-3ee250e3806e884518fd872e9148baf532de6ec54c1cdb4e7679fbb2869d9c47
https://github.com/python/cpython/pull/114760/files#diff-3ee250e3806e884518fd872e9148baf532de6ec54c1cdb4e7679fbb2869d9c47
https://github.com/python/cpython/pull/114760/files#diff-3ee250e3806e884518fd872e9148baf532de6ec54c1cdb4e7679fbb2869d9c47
https://github.com/python/cpython/pull/114760/files#diff-3ee250e3806e884518fd872e9148baf532de6ec54c1cdb4e7679fbb2869d9c47
https://github.com/python/cpython/pull/114760/files#diff-3ee250e3806e884518fd872e9148baf532de6ec54c1cdb4e7679fbb2869d9c47
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.