René's URL Explorer Experiment


Title: Crash on diverging recursive generic protocols · Issue #17326 · python/mypy · GitHub

Open Graph Title: Crash on diverging recursive generic protocols · Issue #17326 · python/mypy

X Title: Crash on diverging recursive generic protocols · Issue #17326 · python/mypy

Description: EDIT: Although the original repro is not causing a crash anymore, the underlying issue is still there, see #17326 (comment) Crash Report Not sure how to title this, the following example produces a segfault, I simplified it from more com...

Open Graph Description: EDIT: Although the original repro is not causing a crash anymore, the underlying issue is still there, see #17326 (comment) Crash Report Not sure how to title this, the following example produces a...

X Description: EDIT: Although the original repro is not causing a crash anymore, the underlying issue is still there, see #17326 (comment) Crash Report Not sure how to title this, the following example produces a...

Opengraph URL: https://github.com/python/mypy/issues/17326

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Crash on diverging recursive generic protocols","articleBody":"_EDIT_: Although the original repro is not causing a crash anymore, the underlying issue is still there, see https://github.com/python/mypy/issues/17326#issuecomment-2151135134\n\n**Crash Report**\n\nNot sure how to title this, the following example produces a segfault, I simplified it from more complicated code. It seems to be multicausal, removing the `Literal` makes it disappear, so does removing the `__or__` operator on `Transform`.\n\n**To Reproduce**\n\nhttps://mypy-play.net/?mypy=latest&python=3.12&gist=2409c60fc1d5734569f6ab55344a85f0\n\n```python\nfrom typing import Any, Literal, Protocol, TypeVar, overload\n\nX = TypeVar(\"X\")\nY = TypeVar(\"Y\")\nZ = TypeVar(\"Z\")\nX2 = TypeVar(\"X2\")\nY2 = TypeVar(\"Y2\")\n\n\nclass Transform(Protocol[X, Y]):\n    def __or__(\n        self, other: \"Transform[X2, Y2]\", /\n    ) -> \"Transform[tuple[X, X2], tuple[Y, Y2]]\": ...\n\n\n@overload  # 1 arg\ndef chain_encoders(\n    e: Transform[X, Y], /, *, simplify: Literal[True] = ...\n) -> Transform[X, Y]: ...\n@overload  # ≥2 args\ndef chain_encoders(\n    *es: *tuple[Transform[Any, Y], *tuple[Transform, ...], Transform[X, Any]],\n    simplify: Literal[True] = ...,\n) -> Transform[X, Y]: ...\ndef chain_encoders(*encoders: Transform, simplify: bool = True) -> Transform:\n    r\"\"\"Chain encoders.\"\"\"\n```\n","author":{"url":"https://github.com/randolf-scholz","@type":"Person","name":"randolf-scholz"},"datePublished":"2024-06-04T12:11:01Z","url":"https://github.com/python/mypy/issues/17326"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1eb50361-c26d-db74-38bd-c2744aff1b15
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA4B6:1A3D7F:2E93475:3D76B36:6B001DE0
html-safe-nonce1bcea2b955ecc615ebe0e45e5bf2b56b7b0e2856b82e185e6c68db6e45c12ea8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNEI2OjFBM0Q3RjoyRTkzNDc1OjNENzZCMzY6NkIwMDFERTAiLCJ2aXNpdG9yX2lkIjoiNjQxMzU0MTA5MTQyOTA2NDE2MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac6203825e2e5aa3070bc08bc8e7b26bfc0f30d0e967f0ee45fffb77eeeaa5434c
hovercard-subject-tagissue:2333370133
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/mypy/17326/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4a6d08054c8e303504ee050ebbb4cf8875e8446041fb0465fe09c9be02a1352b/python/mypy/issues/17326
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4a6d08054c8e303504ee050ebbb4cf8875e8446041fb0465fe09c9be02a1352b/python/mypy/issues/17326
og:image:altEDIT: Although the original repro is not causing a crash anymore, the underlying issue is still there, see #17326 (comment) Crash Report Not sure how to title this, the following example produces a...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamerandolf-scholz
hostnamegithub.com
expected-hostnamegithub.com
None4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0
turbo-cache-controlno-preview
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
release44c658b24abf00491fb7ae5f56d42c9f38cbeab2
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/mypy/issues/17326#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F17326
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%2Fpython%2Fmypy%2Fissues%2F17326
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fmypy
Reloadhttps://github.com/python/mypy/issues/17326
Reloadhttps://github.com/python/mypy/issues/17326
Reloadhttps://github.com/python/mypy/issues/17326
pythonhttps://github.com/python
mypyhttps://github.com/python/mypy
Codehttps://github.com/python/mypy
Issues2.7k (2.7k)https://github.com/python/mypy/issues
Pull requests546 (546)https://github.com/python/mypy/pulls
Actionshttps://github.com/python/mypy/actions
Projectshttps://github.com/python/mypy/projects
Wikihttps://github.com/python/mypy/wiki
Security and qualityhttps://github.com/python/mypy/security
Insightshttps://github.com/python/mypy/insights
https://github.com/python/mypy
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/17326
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/17326
#22036https://github.com/python/mypy/pull/22036
Crash on diverging recursive generic protocolshttps://github.com/python/mypy/issues/17326#top
#22036https://github.com/python/mypy/pull/22036
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
topic-protocolshttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-protocols%22
topic-recursive-typeshttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-recursive-types%22
https://github.com/randolf-scholz
randolf-scholzhttps://github.com/randolf-scholz
on Jun 4, 2024https://github.com/python/mypy/issues/17326#issue-2333370133
#17326 (comment)https://github.com/python/mypy/issues/17326#issuecomment-2151135134
https://mypy-play.net/?mypy=latest&python=3.12&gist=2409c60fc1d5734569f6ab55344a85f0https://mypy-play.net/?mypy=latest&python=3.12&gist=2409c60fc1d5734569f6ab55344a85f0
randolf-scholzhttps://github.com/randolf-scholz
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
on Jun 4, 2024https://github.com/python/mypy/issues/17326#event-13035393214
https://github.com/randolf-scholz
randolf-scholzhttps://github.com/randolf-scholz
on Jun 4, 2024https://github.com/python/mypy/issues/17326#issuecomment-2147381109
#17319https://github.com/python/mypy/issues/17319
AlexWaygoodhttps://github.com/AlexWaygood
topic-protocolshttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-protocols%22
on Jun 4, 2024https://github.com/python/mypy/issues/17326#event-13036099819
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
on Jun 4, 2024https://github.com/python/mypy/issues/17326#issuecomment-2147510198
AlexWaygoodhttps://github.com/AlexWaygood
topic-recursive-typeshttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-recursive-types%22
topic-overloadshttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-overloads%22
topic-pep-646PEP 646 (TypeVarTuple, Unpack)https://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-pep-646%22
on Jun 4, 2024https://github.com/python/mypy/issues/17326#event-13036314430
https://github.com/AlexWaygood
AlexWaygoodhttps://github.com/AlexWaygood
on Jun 4, 2024https://github.com/python/mypy/issues/17326#issuecomment-2147513828
JelleZijlstrahttps://github.com/JelleZijlstra
on Jun 4, 2024https://github.com/python/mypy/issues/17326#event-13037291102
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Jun 5, 2024https://github.com/python/mypy/issues/17326#issuecomment-2151135134
ilevkivskyihttps://github.com/ilevkivskyi
topic-overloadshttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-overloads%22
topic-pep-646PEP 646 (TypeVarTuple, Unpack)https://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-pep-646%22
on Jun 5, 2024https://github.com/python/mypy/issues/17326#event-13058656803
ilevkivskyihttps://github.com/ilevkivskyi
on Jun 5, 2024https://github.com/python/mypy/issues/17326#event-13058660435
https://github.com/randolf-scholz
randolf-scholzhttps://github.com/randolf-scholz
on Jun 6, 2024https://github.com/python/mypy/issues/17326#issuecomment-2151561130
https://github.com/randolf-scholz
randolf-scholzhttps://github.com/randolf-scholz
on Jun 6, 2024https://github.com/python/mypy/issues/17326#issuecomment-2152810925
pyright playgroundhttps://pyright-play.net/?strict=true&code=GYJw9gtgBALgngBwJYDsDmUkQWEMoAK4MYAxmADYBQVpFAhgM6OEDaAKgLoAURYJ5CgEoAXFSgSoAEwCmwKBBkwAFt0YyKwIVAC0APigAiAqwpJGMDp06GRUAHSOadJiwDCYydLkKlq9Zra%2BkZutuJekiBKAK4gKFABwDSy8kwA%2BghW3AAediZcQQb5nJ6RMXFQ2TRRAG4y9BRp8Agy3OkI3G7cQj0SAMRsAKooANYoYADuKJxUQA
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Jun 6, 2024https://github.com/python/mypy/issues/17326#issuecomment-2152849695
https://github.com/sterliakov
sterliakovhttps://github.com/sterliakov
on Jan 15, 2025https://github.com/python/mypy/issues/17326#issuecomment-2591594455
#17392https://github.com/python/mypy/pull/17392
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Jan 15, 2025https://github.com/python/mypy/issues/17326#issuecomment-2592233084
ilevkivskyihttps://github.com/ilevkivskyi
on Jan 15, 2025https://github.com/python/mypy/issues/17326#event-15938008458
https://github.com/sterliakov
sterliakovhttps://github.com/sterliakov
on Sep 2, 2025https://github.com/python/mypy/issues/17326#issuecomment-3243617298
#18195https://github.com/python/mypy/issues/18195
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Sep 2, 2025https://github.com/python/mypy/issues/17326#issuecomment-3245705473
@sterliakovhttps://github.com/sterliakov
ilevkivskyihttps://github.com/ilevkivskyi
completedhttps://github.com/python/mypy/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#22036https://github.com/python/mypy/pull/22036
on Sep 24, 2026https://github.com/python/mypy/issues/17326#event-31797334221
ilevkivskyihttps://github.com/ilevkivskyi
on Sep 24, 2026https://github.com/python/mypy/issues/17326#event-31797588892
Handle diverging protocol (python#22036)https://github.com/ilevkivskyi/mypy/commit/865308bdf5be0f9be6baf6dd919e512eeb7b0007
python#22036https://github.com/python/mypy/pull/22036
865308bhttps://github.com/ilevkivskyi/mypy/commit/865308bdf5be0f9be6baf6dd919e512eeb7b0007
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/mypy/issues/17326
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/mypy/issues/17326
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
topic-protocolshttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-protocols%22
topic-recursive-typeshttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-recursive-types%22
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.