René's URL Explorer Experiment


Title: Short term fix for bytes narrowing by hauntsaninja · Pull Request #20704 · python/mypy · GitHub

Open Graph Title: Short term fix for bytes narrowing by hauntsaninja · Pull Request #20704 · python/mypy

X Title: Short term fix for bytes narrowing by hauntsaninja · Pull Request #20704 · python/mypy

Description: Optional static typing for Python. Contribute to python/mypy development by creating an account on GitHub.

Open Graph Description: Fixes #20701 / see discussion there Background: In Rework narrowing logic for equality and identity #20492 I added code to treat bytes, bytearray and memoryview as having custom __eq__, since they...

X Description: Fixes #20701 / see discussion there Background: In Rework narrowing logic for equality and identity #20492 I added code to treat bytes, bytearray and memoryview as having custom __eq__, since they...

Opengraph URL: https://github.com/python/mypy/pull/20704

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:3d0f38fe-962e-c5f0-c524-a4e7df066557
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBD8E:1978BB:C304C7:1077F4F:6A5945DD
html-safe-nonce3834d3f8bb2fd7ac88a11ab18364c7c22021783328e2cd49d562724ddbf3c689
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDhFOjE5NzhCQjpDMzA0Qzc6MTA3N0Y0Rjo2QTU5NDVERCIsInZpc2l0b3JfaWQiOiI4Mzc3MTczMzk4NjgyOTQ0OTg5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac6feb4a7e70d2e5cd7371ff2f056112ad38dc86f7247a8445ba4da0bb32230be9
hovercard-subject-tagpull_request:3229660028
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/mypy/20704/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/338f000120d49741d31463d5d2f471d769400749c74ec4c5b519c42ea0e919ea/python/mypy/pull/20704
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/338f000120d49741d31463d5d2f471d769400749c74ec4c5b519c42ea0e919ea/python/mypy/pull/20704
og:image:altFixes #20701 / see discussion there Background: In Rework narrowing logic for equality and identity #20492 I added code to treat bytes, bytearray and memoryview as having custom __eq__, since they...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamehauntsaninja
hostnamegithub.com
expected-hostnamegithub.com
None9f801e05b35c85b2d72eae6534d2b1d4c02ba8732fd046450bab31e2f52450ce
turbo-cache-controlno-cache
go-importgithub.com/python/mypy git https://github.com/python/mypy.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id7053637
octolytics-dimension-repository_nwopython/mypy
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id7053637
octolytics-dimension-repository_network_root_nwopython/mypy
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
release49918fc503387d6d65b6bc6ce6f711c14d17bfbd
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/mypy/pull/20704#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F20704
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%2Fmypy%2Fpull%2F20704
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%2Fmypy
Reloadhttps://github.com/python/mypy/pull/20704
Reloadhttps://github.com/python/mypy/pull/20704
Reloadhttps://github.com/python/mypy/pull/20704
Please reload this pagehttps://github.com/python/mypy/pull/20704
python https://github.com/python
mypyhttps://github.com/python/mypy
Please reload this pagehttps://github.com/python/mypy/pull/20704
Notifications https://github.com/login?return_to=%2Fpython%2Fmypy
Fork 3.2k https://github.com/login?return_to=%2Fpython%2Fmypy
Star 20.5k https://github.com/login?return_to=%2Fpython%2Fmypy
Code https://github.com/python/mypy
Issues 2.7k https://github.com/python/mypy/issues
Pull requests 466 https://github.com/python/mypy/pulls
Actions https://github.com/python/mypy/actions
Projects https://github.com/python/mypy/projects
Wiki https://github.com/python/mypy/wiki
Security and quality 0 https://github.com/python/mypy/security
Insights https://github.com/python/mypy/pulse
Code https://github.com/python/mypy
Issues https://github.com/python/mypy/issues
Pull requests https://github.com/python/mypy/pulls
Actions https://github.com/python/mypy/actions
Projects https://github.com/python/mypy/projects
Wiki https://github.com/python/mypy/wiki
Security and quality https://github.com/python/mypy/security
Insights https://github.com/python/mypy/pulse
JukkaLhttps://github.com/JukkaL
python:masterhttps://github.com/python/mypy/tree/master
hauntsaninja:narrow72https://github.com/hauntsaninja/mypy/tree/narrow72
Conversationhttps://github.com/python/mypy/pull/20704
Commits1 (1)https://github.com/python/mypy/pull/20704/commits
Checkshttps://github.com/python/mypy/pull/20704/checks
Files changedhttps://github.com/python/mypy/pull/20704/files
Short term fix for bytes narrowinghttps://github.com/python/mypy/pull/20704#top
JukkaLhttps://github.com/JukkaL
python:masterhttps://github.com/python/mypy/tree/master
hauntsaninja:narrow72https://github.com/hauntsaninja/mypy/tree/narrow72
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
Jan 30, 2026https://github.com/python/mypy/pull/20704#issue-3877845526
Please reload this pagehttps://github.com/python/mypy/pull/20704
#20701https://github.com/python/mypy/issues/20701
Rework narrowing logic for equality and identity #20492https://github.com/python/mypy/pull/20492
Better narrowing with custom equality #20643https://github.com/python/mypy/pull/20643
[wip] Better handling of generics when narrowing #20673https://github.com/python/mypy/pull/20673
Rework narrowing logic for equality and identity #20492https://github.com/python/mypy/pull/20492
Improve reachability in narrowing logic #20660https://github.com/python/mypy/pull/20660
Please reload this pagehttps://github.com/python/mypy/pull/20704
https://github.com/hauntsaninja
Add tests for bytes narrowinghttps://github.com/python/mypy/pull/20704/commits/aaa0f5f82201f2f4944f73d05961731f99856420
aaa0f5fhttps://github.com/python/mypy/pull/20704/commits/aaa0f5f82201f2f4944f73d05961731f99856420
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
Jan 30, 2026 https://github.com/python/mypy/pull/20704#ref-issue-3802163929
Better narrowing #20564 https://github.com/python/mypy/issues/20564
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
Jan 30, 2026https://github.com/python/mypy/pull/20704#issuecomment-3826535376
mypy_primerhttps://github.com/hauntsaninja/mypy_primer
Please reload this pagehttps://github.com/python/mypy/pull/20704
https://github.com/A5rocks
A5rockshttps://github.com/A5rocks
Jan 30, 2026https://github.com/python/mypy/pull/20704#issuecomment-3826536746
Please reload this pagehttps://github.com/python/mypy/pull/20704
Please reload this pagehttps://github.com/python/mypy/pull/20704
https://github.com/A5rocks
A5rockshttps://github.com/A5rocks
Jan 31, 2026 https://github.com/python/mypy/pull/20704#pullrequestreview-3731071998
View reviewed changes https://github.com/python/mypy/pull/20704/files/aaa0f5f82201f2f4944f73d05961731f99856420
A5rockshttps://github.com/A5rocks
https://github.com/python/mypy/pull/20704#pullrequestreview-3731071998
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/20704
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
Jan 31, 2026https://github.com/python/mypy/pull/20704#issuecomment-3826643070
Please reload this pagehttps://github.com/python/mypy/pull/20704
https://github.com/python/mypy/pull/20704/files#diff-0413401ad6a91bc5c66579455009ba606ee0ddfb0a78278c9e53618c83b53ed5R3426https://github.com/python/mypy/pull/20704/files#diff-0413401ad6a91bc5c66579455009ba606ee0ddfb0a78278c9e53618c83b53ed5R3426
Please reload this pagehttps://github.com/python/mypy/pull/20704
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
ec4c463https://github.com/python/mypy/commit/ec4c463861fd8683f85fa0c34929e8fca499530f
Feb 2, 2026https://github.com/python/mypy/pull/20704#event-22470405667
Please reload this pagehttps://github.com/python/mypy/pull/20704
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
Feb 3, 2026 https://github.com/python/mypy/pull/20704#ref-pullrequest-3889382138
Improve narrowing with numeric types #20727 https://github.com/python/mypy/pull/20727
hauntsaninjahttps://github.com/hauntsaninja
Feb 7, 2026 https://github.com/python/mypy/pull/20704#ref-commit-655a8a2
https://github.com/hauntsaninja
Improve narrowing with numeric types (https://github.com/python/mypy/commit/655a8a2e41b435e21101311a943abc71c821491e
#20727https://github.com/python/mypy/pull/20727
)https://github.com/python/mypy/commit/655a8a2e41b435e21101311a943abc71c821491e
655a8a2https://github.com/python/mypy/commit/655a8a2e41b435e21101311a943abc71c821491e
#20709https://github.com/python/mypy/pull/20709
#20660https://github.com/python/mypy/pull/20660
#20704https://github.com/python/mypy/pull/20704
hauntsaninjahttps://github.com/hauntsaninja
Apr 2, 2026 https://github.com/python/mypy/pull/20704#ref-commit-8451b92
https://github.com/hauntsaninja
Fix reachability for frozenset and dict view narrowinghttps://github.com/hauntsaninja/mypy/commit/8451b92fd6504d5430441d7c7a144d328ac9d89b
8451b92https://github.com/hauntsaninja/mypy/commit/8451b92fd6504d5430441d7c7a144d328ac9d89b
python#21143https://github.com/python/mypy/issues/21143
python#20704https://github.com/python/mypy/pull/20704
python#20863https://github.com/python/mypy/pull/20863
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
Apr 2, 2026 https://github.com/python/mypy/pull/20704#ref-pullrequest-4197316986
Fix reachability for frozenset and dict view narrowing #21151 https://github.com/python/mypy/pull/21151
hauntsaninjahttps://github.com/hauntsaninja
Apr 3, 2026 https://github.com/python/mypy/pull/20704#ref-commit-bdb0dd4
https://github.com/hauntsaninja
Fix reachability for frozenset and dict view narrowing (https://github.com/python/mypy/commit/bdb0dd499453584911c3d10dfb8a618ea53c699f
#21151https://github.com/python/mypy/pull/21151
)https://github.com/python/mypy/commit/bdb0dd499453584911c3d10dfb8a618ea53c699f
bdb0dd4https://github.com/python/mypy/commit/bdb0dd499453584911c3d10dfb8a618ea53c699f
#21143https://github.com/python/mypy/issues/21143
#20704https://github.com/python/mypy/pull/20704
#20863https://github.com/python/mypy/pull/20863
hauntsaninjahttps://github.com/hauntsaninja
Apr 5, 2026 https://github.com/python/mypy/pull/20704#ref-commit-6fccffc
https://github.com/hauntsaninja
Fix reachability for frozenset and dict view narrowing (https://github.com/python/mypy/commit/6fccffcac0c8c24034d4f2b262ca7e5564ba9375
#21151https://github.com/python/mypy/pull/21151
)https://github.com/python/mypy/commit/6fccffcac0c8c24034d4f2b262ca7e5564ba9375
6fccffchttps://github.com/python/mypy/commit/6fccffcac0c8c24034d4f2b262ca7e5564ba9375
#21143https://github.com/python/mypy/issues/21143
#20704https://github.com/python/mypy/pull/20704
#20863https://github.com/python/mypy/pull/20863
https://github.co/hiddenchars
https://github.com/python/mypy/pull/{{ revealButtonHref }}
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%2Fmypy%2Fpull%2F20704
https://github.com/A5rocks
A5rocks https://github.com/A5rocks
https://github.com/python/mypy/pull/20704/files/aaa0f5f82201f2f4944f73d05961731f99856420
Optional bytes type not narrowed after asserting equality https://github.com/python/mypy/issues/20701
Please reload this pagehttps://github.com/python/mypy/pull/20704
https://github.com/hauntsaninja
https://github.com/A5rocks
https://github.com/JukkaL
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.