René's URL Explorer Experiment


Title: mypy crashes with overloads of functools.singledispatch · Issue #8356 · python/mypy · GitHub

Open Graph Title: mypy crashes with overloads of functools.singledispatch · Issue #8356 · python/mypy

X Title: mypy crashes with overloads of functools.singledispatch · Issue #8356 · python/mypy

Description: I was trying out the advice I gave in #8354, and encountered a mypy crash: ~/delete λ cat test22.py 2 from typing import * import functools @overload def foo(val: str) -> str: ... @overload def foo(val: int) -> int: ... @functools.single...

Open Graph Description: I was trying out the advice I gave in #8354, and encountered a mypy crash: ~/delete λ cat test22.py 2 from typing import * import functools @overload def foo(val: str) -> str: ... @overload def foo...

X Description: I was trying out the advice I gave in #8354, and encountered a mypy crash: ~/delete λ cat test22.py 2 from typing import * import functools @overload def foo(val: str) -> str: ... @overload def ...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mypy crashes with overloads of functools.singledispatch","articleBody":"I was trying out the advice I gave in https://github.com/python/mypy/issues/8354, and encountered a mypy crash:\r\n\r\n```\r\n~/delete λ cat test22.py                                                                                         2 \r\nfrom typing import *\r\nimport functools\r\n\r\n\r\n@overload\r\ndef foo(val: str) -> str: ...\r\n@overload\r\ndef foo(val: int) -> int: ...\r\n\r\n\r\n@functools.singledispatch\r\ndef foo(x):\r\n    return x\r\n\r\n\r\n@foo.register\r\ndef _(x: int) -> int:\r\n    return x + 1\r\n~/delete λ mypy test22.py --show-traceback\r\ntest22.py:5: error: INTERNAL ERROR -- Please try using mypy master on Github:\r\nhttps://mypy.rtfd.io/en/latest/common_issues.html#using-a-development-mypy-build\r\nPlease report a bug at https://github.com/python/mypy/issues\r\nversion: 0.770+dev.0b9089e9c9be2ad0b345b1d3743f808365d4aefc\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/mypy\", line 11, in \u003cmodule>\r\n    load_entry_point('mypy', 'console_scripts', 'mypy')()\r\n  File \"/Users/shantanu/dev/mypy/mypy/__main__.py\", line 8, in console_entry\r\n    main(None, sys.stdout, sys.stderr)\r\n  File \"/Users/shantanu/dev/mypy/mypy/main.py\", line 89, in main\r\n    res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)\r\n  File \"/Users/shantanu/dev/mypy/mypy/build.py\", line 166, in build\r\n    sources, options, alt_lib_path, flush_errors, fscache, stdout, stderr, extra_plugins\r\n  File \"/Users/shantanu/dev/mypy/mypy/build.py\", line 234, in _build\r\n    graph = dispatch(sources, manager, stdout)\r\n  File \"/Users/shantanu/dev/mypy/mypy/build.py\", line 2612, in dispatch\r\n    process_graph(graph, manager)\r\n  File \"/Users/shantanu/dev/mypy/mypy/build.py\", line 2919, in process_graph\r\n    process_stale_scc(graph, scc, manager)\r\n  File \"/Users/shantanu/dev/mypy/mypy/build.py\", line 3018, in process_stale_scc\r\n    graph[id].type_check_first_pass()\r\n  File \"/Users/shantanu/dev/mypy/mypy/build.py\", line 2111, in type_check_first_pass\r\n    self.type_checker().check_first_pass()\r\n  File \"/Users/shantanu/dev/mypy/mypy/checker.py\", line 293, in check_first_pass\r\n    self.accept(d)\r\n  File \"/Users/shantanu/dev/mypy/mypy/checker.py\", line 400, in accept\r\n    stmt.accept(self)\r\n  File \"/Users/shantanu/dev/mypy/mypy/nodes.py\", line 515, in accept\r\n    return visitor.visit_overloaded_func_def(self)\r\n  File \"/Users/shantanu/dev/mypy/mypy/checker.py\", line 433, in visit_overloaded_func_def\r\n    self._visit_overloaded_func_def(defn)\r\n  File \"/Users/shantanu/dev/mypy/mypy/checker.py\", line 460, in _visit_overloaded_func_def\r\n    self.check_overlapping_overloads(defn)\r\n  File \"/Users/shantanu/dev/mypy/mypy/checker.py\", line 481, in check_overlapping_overloads\r\n    assert isinstance(inner_type, CallableType)\r\nAssertionError: \r\ntest22.py:5: : note: use --pdb to drop into pdb\r\n```","author":{"url":"https://github.com/hauntsaninja","@type":"Person","name":"hauntsaninja"},"datePublished":"2020-02-02T08:35:39Z","url":"https://github.com/python/mypy/issues/8356"}

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:ca0587a4-2c81-547f-d07e-fda8570310d9
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB9D8:23FDF9:2054D8A:2C0FCA2:6B00240B
html-safe-nonce4b672e4a0a75570437102c8eae53efc122c999228a81d7ae007f0986ea2600a1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOUQ4OjIzRkRGOToyMDU0RDhBOjJDMEZDQTI6NkIwMDI0MEIiLCJ2aXNpdG9yX2lkIjoiMzA1MzA3NDMxNzI5MTAzNzcwNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaca723d9be318d16f614d9b7dc0549aea25721c3f2ecaa0a6850fbdc04129165df
hovercard-subject-tagissue:558663686
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/8356/issue_layout
twitter:imagehttps://opengraph.githubassets.com/87221ec637f1dcf7e6548dd22a56f6fbdaeb6decdac03ccdeaf299ee1c05729a/python/mypy/issues/8356
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/87221ec637f1dcf7e6548dd22a56f6fbdaeb6decdac03ccdeaf299ee1c05729a/python/mypy/issues/8356
og:image:altI was trying out the advice I gave in #8354, and encountered a mypy crash: ~/delete λ cat test22.py 2 from typing import * import functools @overload def foo(val: str) -> str: ... @overload def foo...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamehauntsaninja
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/8356#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F8356
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%2F8356
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/8356
Reloadhttps://github.com/python/mypy/issues/8356
Reloadhttps://github.com/python/mypy/issues/8356
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/8356
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/8356
#11630https://github.com/python/mypy/pull/11630
mypy crashes with overloads of functools.singledispatchhttps://github.com/python/mypy/issues/8356#top
#11630https://github.com/python/mypy/pull/11630
bugmypy got something wronghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22bug%22
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
good-first-issuehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22good-first-issue%22
priority-0-highhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-0-high%22
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
on Feb 2, 2020https://github.com/python/mypy/issues/8356#issue-558663686
#8354https://github.com/python/mypy/issues/8354
https://github.com/jeanmonet
jeanmonethttps://github.com/jeanmonet
on Feb 4, 2020https://github.com/python/mypy/issues/8356#issuecomment-581926499
msullivanhttps://github.com/msullivan
bugmypy got something wronghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22bug%22
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
on Feb 7, 2020https://github.com/python/mypy/issues/8356#event-3019435061
JukkaLhttps://github.com/JukkaL
priority-0-highhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-0-high%22
good-first-issuehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22good-first-issue%22
on Mar 23, 2020https://github.com/python/mypy/issues/8356#event-3156409662
https://github.com/mattany
mattanyhttps://github.com/mattany
on Apr 7, 2020https://github.com/python/mypy/issues/8356#issuecomment-610659782
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
on Apr 7, 2020https://github.com/python/mypy/issues/8356#issuecomment-610675032
https://github.com/mattany
mattanyhttps://github.com/mattany
on Apr 8, 2020https://github.com/python/mypy/issues/8356#issuecomment-610686233
@jeanmonethttps://github.com/jeanmonet
@hauntsaninjahttps://github.com/hauntsaninja
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
on Apr 8, 2020https://github.com/python/mypy/issues/8356#issuecomment-610752715
https://docs.python.org/3/library/functools.html#functools.singledispatchhttps://docs.python.org/3/library/functools.html#functools.singledispatch
https://mypy.readthedocs.io/en/stable/more_types.html#function-overloadinghttps://mypy.readthedocs.io/en/stable/more_types.html#function-overloading
https://github.com/graingert
graingerthttps://github.com/graingert
on Apr 26, 2020https://github.com/python/mypy/issues/8356#issuecomment-619608351
#2904https://github.com/python/mypy/issues/2904
https://github.com/radeklat
radeklathttps://github.com/radeklat
on Jul 16, 2020https://github.com/python/mypy/issues/8356#issuecomment-659414875
https://github.com/abbasidaniyal
abbasidaniyalhttps://github.com/abbasidaniyal
on Mar 14, 2021https://github.com/python/mypy/issues/8356#issuecomment-798968156
https://github.com/kstauffer
kstaufferhttps://github.com/kstauffer
on Jul 21, 2021https://github.com/python/mypy/issues/8356#issuecomment-884527766
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
on Jul 21, 2021https://github.com/python/mypy/issues/8356#issuecomment-884530189
@pranavrajpalhttps://github.com/pranavrajpal
https://github.com/kstauffer
kstaufferhttps://github.com/kstauffer
on Jul 21, 2021https://github.com/python/mypy/issues/8356#issuecomment-884535857
https://github.com/kstauffer
kstaufferhttps://github.com/kstauffer
on Jul 21, 2021https://github.com/python/mypy/issues/8356#issuecomment-884548381
https://github.com/pranavrajpal
pranavrajpalhttps://github.com/pranavrajpal
on Jul 22, 2021https://github.com/python/mypy/issues/8356#issuecomment-884655875
@pranavrajpalhttps://github.com/pranavrajpal
https://github.com/kstauffer
kstaufferhttps://github.com/kstauffer
on Jul 22, 2021https://github.com/python/mypy/issues/8356#issuecomment-885073554
https://github.com/kstauffer
kstaufferhttps://github.com/kstauffer
on Jul 22, 2021https://github.com/python/mypy/issues/8356#issuecomment-885156054
hauntsaninjahttps://github.com/hauntsaninja
on Nov 27, 2021https://github.com/python/mypy/issues/8356#event-5679923842
Fix crash with overload and callable object decoratorshttps://github.com/hauntsaninja/mypy/commit/9a954f51af5c4bf3f1ba6f4b77f950414ee4d636
9a954f5https://github.com/hauntsaninja/mypy/commit/9a954f51af5c4bf3f1ba6f4b77f950414ee4d636
Fix crash with overload and callable object decoratorshttps://github.com/hauntsaninja/mypy/commit/085b88f1d3560445b35f67f414ab305b830f9f79
085b88fhttps://github.com/hauntsaninja/mypy/commit/085b88f1d3560445b35f67f414ab305b830f9f79
hauntsaninjahttps://github.com/hauntsaninja
completedhttps://github.com/python/mypy/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#11630https://github.com/python/mypy/pull/11630
on Nov 28, 2021https://github.com/python/mypy/issues/8356#event-5680669415
hauntsaninjahttps://github.com/hauntsaninja
on Nov 28, 2021https://github.com/python/mypy/issues/8356#event-5680669479
Fix crash with overload and callable object decorators (#11630)https://github.com/python/mypy/commit/7b13ff87a786e3511c9646bd3827a1344c4fb1f5
#11630https://github.com/python/mypy/pull/11630
https://docs.github.com/articles/closing-issues-via-commit-messages
7b13ff8https://github.com/python/mypy/commit/7b13ff87a786e3511c9646bd3827a1344c4fb1f5
https://github.com/shaunc
shaunchttps://github.com/shaunc
on Nov 28, 2021https://github.com/python/mypy/issues/8356#issuecomment-980838655
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
on Nov 28, 2021https://github.com/python/mypy/issues/8356#issuecomment-980839236
https://github.com/shaunc
shaunchttps://github.com/shaunc
on Nov 28, 2021https://github.com/python/mypy/issues/8356#issuecomment-980839484
ilevkivskyihttps://github.com/ilevkivskyi
on Dec 3, 2021https://github.com/python/mypy/issues/8356#event-5712765949
Fix crash with overload and callable object decorators (#11630)https://github.com/python/mypy/commit/dd086bc75c8b846ecd8a086dbf2067b92f5d432b
#11630https://github.com/python/mypy/pull/11630
https://docs.github.com/articles/closing-issues-via-commit-messages
dd086bchttps://github.com/python/mypy/commit/dd086bc75c8b846ecd8a086dbf2067b92f5d432b
tushar-deepsourcehttps://github.com/tushar-deepsource
on Jan 20, 2022https://github.com/python/mypy/issues/8356#event-5924012391
Fix crash with overload and callable object decorators (python#11630)https://github.com/DeepSourceCorp/mypy/commit/713df5ea34f8f92941511320aa921bb0c453dceb
python#11630https://github.com/python/mypy/pull/11630
https://docs.github.com/articles/closing-issues-via-commit-messages
713df5ehttps://github.com/DeepSourceCorp/mypy/commit/713df5ea34f8f92941511320aa921bb0c453dceb
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/mypy/issues/8356
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/mypy/issues/8356
bugmypy got something wronghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22bug%22
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
good-first-issuehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22good-first-issue%22
priority-0-highhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-0-high%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.