René's URL Explorer Experiment


Title: mypy RecursionError analyzing pint.facets.plain.quantity.PlainQuantity · Issue #21985 · python/mypy · GitHub

Open Graph Title: mypy RecursionError analyzing pint.facets.plain.quantity.PlainQuantity · Issue #21985 · python/mypy

X Title: mypy RecursionError analyzing pint.facets.plain.quantity.PlainQuantity · Issue #21985 · python/mypy

Description: Crash Report mypy crashes with RecursionError while analyzing pint (since pint==0.26.1). Reproduced with compiled and non-compiled mypy. Traceback ... skipping approx 50000 lines ... File "/home/quentin/dev/QSA/pint_0.x/.venv/lib/python3...

Open Graph Description: Crash Report mypy crashes with RecursionError while analyzing pint (since pint==0.26.1). Reproduced with compiled and non-compiled mypy. Traceback ... skipping approx 50000 lines ... File "/home/qu...

X Description: Crash Report mypy crashes with RecursionError while analyzing pint (since pint==0.26.1). Reproduced with compiled and non-compiled mypy. Traceback ... skipping approx 50000 lines ... File "/ho...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mypy RecursionError analyzing pint.facets.plain.quantity.PlainQuantity","articleBody":"**Crash Report**\n\n`mypy` crashes with `RecursionError` while analyzing `pint` (since `pint==0.26.1`). Reproduced with compiled and non-compiled mypy.\n\n**Traceback**\n\n```python-traceback\n... skipping approx 50000 lines ...\n  File \"/home/quentin/dev/QSA/pint_0.x/.venv/lib/python3.13/site-packages/mypy/type_visitor.py\", line 560, in visit_instance\n    return self.query_types(t.args)\n           ~~~~~~~~~~~~~~~~^^^^^^^^\n  File \"/home/quentin/dev/QSA/pint_0.x/.venv/lib/python3.13/site-packages/mypy/type_visitor.py\", line 628, in query_types\n    return any(t.accept(self) for t in types)\n  File \"/home/quentin/dev/QSA/pint_0.x/.venv/lib/python3.13/site-packages/mypy/type_visitor.py\", line 628, in \u003cgenexpr>\n    return any(t.accept(self) for t in types)\n               ~~~~~~~~^^^^^^\n  File \"/home/quentin/dev/QSA/pint_0.x/.venv/lib/python3.13/site-packages/mypy/types.py\", line 1684, in accept\n    return visitor.visit_instance(self)\n           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^\n  File \"/home/quentin/dev/QSA/pint_0.x/.venv/lib/python3.13/site-packages/mypy/type_visitor.py\", line 560, in visit_instance\n    return self.query_types(t.args)\n           ~~~~~~~~~~~~~~~~^^^^^^^^\n  File \"/home/quentin/dev/QSA/pint_0.x/.venv/lib/python3.13/site-packages/mypy/type_visitor.py\", line 628, in query_types\n    return any(t.accept(self) for t in types)\n  File \"/home/quentin/dev/QSA/pint_0.x/.venv/lib/python3.13/site-packages/mypy/type_visitor.py\", line 628, in \u003cgenexpr>\n    return any(t.accept(self) for t in types)\n               ~~~~~~~~^^^^^^\n  File \"/home/quentin/dev/QSA/pint_0.x/.venv/lib/python3.13/site-packages/mypy/types.py\", line 1684, in accept\n    return visitor.visit_instance(self)\n           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^\n  File \"/home/quentin/dev/QSA/pint_0.x/.venv/lib/python3.13/site-packages/mypy/type_visitor.py\", line 560, in visit_instance\n    return self.query_types(t.args)\n           ~~~~~~~~~~~~~~~~^^^^^^^^\n  File \"/home/quentin/dev/QSA/pint_0.x/.venv/lib/python3.13/site-packages/mypy/type_visitor.py\", line 628, in query_types\n    return any(t.accept(self) for t in types)\n  File \"/home/quentin/dev/QSA/pint_0.x/.venv/lib/python3.13/site-packages/mypy/type_visitor.py\", line 628, in \u003cgenexpr>\n    return any(t.accept(self) for t in types)\n               ~~~~~~~~^^^^^^\n  File \"/home/quentin/dev/QSA/pint_0.x/.venv/lib/python3.13/site-packages/mypy/types.py\", line 1684, in accept\n    return visitor.visit_instance(self)\n           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^\nRecursionError: maximum recursion depth exceeded\n/home/quentin/dev/QSA/pint_0.x/.venv/lib/python3.13/site-packages/pint/facets/numpy/quantity.py:63: note: use --pdb to drop into pdb\nRecursionError: maximum recursion depth exceeded\n```\n\n**To Reproduce**\n\nI narrowed down the issue to this single import of `pint.facets.plain.quantity.PlainQuantity`.\nRun `mypy` on a file with this content:\n\n```python\nfrom pint.facets.plain.quantity import PlainQuantity\n```\n\n**Your Environment**\n\nIssue appears since version `0.26` of `pint` when they introduced massive type annotations for `PlainQuantity`. See https://github.com/hgrecco/pint/pull/2302 and https://github.com/hgrecco/pint/pull/2303\n\n- Mypy version used: `2.3.1` and `1.9.1`\n- Mypy command-line flags: none\n- Mypy configuration options from `mypy.ini` (and other config files): none\n- Python version used: `3.13.12`\n- Operating system and version: Fedora 43 in WSL2\n\n\n","author":{"url":"https://github.com/quentin","@type":"Person","name":"quentin"},"datePublished":"2026-09-15T07:35:55Z","url":"https://github.com/python/mypy/issues/21985"}

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:ce76de30-f710-3749-39cf-61a1ff1c4906
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD676:B1603:2E97CAF:3D90283:6B0023F5
html-safe-nonceec536ea9e565274e4214420373160c99c811f4042798eb05a6b2e7cc510529bb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjc2OkIxNjAzOjJFOTdDQUY6M0Q5MDI4Mzo2QjAwMjNGNSIsInZpc2l0b3JfaWQiOiI3NjM0OTY0OTYyMTc1MDk5ODkzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac921185a14af4c03e3bed18aff3606a344a2ce664950911840333b1ed642ef023
hovercard-subject-tagissue:5459017650
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/21985/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4a6d08054c8e303504ee050ebbb4cf8875e8446041fb0465fe09c9be02a1352b/python/mypy/issues/21985
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4a6d08054c8e303504ee050ebbb4cf8875e8446041fb0465fe09c9be02a1352b/python/mypy/issues/21985
og:image:altCrash Report mypy crashes with RecursionError while analyzing pint (since pint==0.26.1). Reproduced with compiled and non-compiled mypy. Traceback ... skipping approx 50000 lines ... File "/home/qu...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamequentin
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/21985#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F21985
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%2F21985
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/21985
Reloadhttps://github.com/python/mypy/issues/21985
Reloadhttps://github.com/python/mypy/issues/21985
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/21985
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/21985
#22036https://github.com/python/mypy/pull/22036
mypy RecursionError analyzing pint.facets.plain.quantity.PlainQuantityhttps://github.com/python/mypy/issues/21985#top
#22036https://github.com/python/mypy/pull/22036
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
topic-recursive-typeshttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-recursive-types%22
https://github.com/quentin
quentinhttps://github.com/quentin
on Sep 15, 2026https://github.com/python/mypy/issues/21985#issue-5459017650
hgrecco/pint#2302https://github.com/hgrecco/pint/pull/2302
hgrecco/pint#2303https://github.com/hgrecco/pint/pull/2303
quentinhttps://github.com/quentin
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
on Sep 15, 2026https://github.com/python/mypy/issues/21985#event-31155385183
ilevkivskyihttps://github.com/ilevkivskyi
topic-recursive-typeshttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-recursive-types%22
on Sep 15, 2026https://github.com/python/mypy/issues/21985#event-31176291653
https://github.com/istoolsfox
istoolsfoxhttps://github.com/istoolsfox
on Sep 17, 2026https://github.com/python/mypy/issues/21985#issuecomment-5711305722
8e5b0e3https://github.com/python/mypy/commit/8e5b0e34a5032760fa1916c39202a185d5fb0ea0
https://github.com/cfriedland5
cfriedland5https://github.com/cfriedland5
on Sep 17, 2026https://github.com/python/mypy/issues/21985#issuecomment-5721675439
https://github.com/istoolsfox
istoolsfoxhttps://github.com/istoolsfox
on Sep 18, 2026https://github.com/python/mypy/issues/21985#issuecomment-5724628247
60ca82bhttps://github.com/python/mypy/commit/60ca82b1059c15db642d7aaa4eab90cf85c81f5f
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/21985#event-31797334652
ilevkivskyihttps://github.com/ilevkivskyi
on Sep 24, 2026https://github.com/python/mypy/issues/21985#event-31797589025
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
finsberghttps://github.com/finsberg
on Sep 28, 2026https://github.com/python/mypy/issues/21985#event-31994967885
Drop scipy-stubs: with pint >= 0.26 it crashes mypyhttps://github.com/ComputationalPhysiology/simcardemsx/commit/09d2c969e8cfb6cd4214d3289eee8ee2b985c654
09d2c96https://github.com/ComputationalPhysiology/simcardemsx/commit/09d2c969e8cfb6cd4214d3289eee8ee2b985c654
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/mypy/issues/21985
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/mypy/issues/21985
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%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.