René's URL Explorer Experiment


Title: Mypy 1.11.0 crashes on typing.NotRequired with `--html-report` · Issue #17604 · python/mypy · GitHub

Open Graph Title: Mypy 1.11.0 crashes on typing.NotRequired with `--html-report` · Issue #17604 · python/mypy

X Title: Mypy 1.11.0 crashes on typing.NotRequired with `--html-report` · Issue #17604 · python/mypy

Description: Crash Report Mypy crashes on a Python file that makes use of typing.NotRequired when used with the --html-report option. Traceback To Reproduce I took an example from the typing docs on TypedDict: from typing import NotRequired, TypedDic...

Open Graph Description: Crash Report Mypy crashes on a Python file that makes use of typing.NotRequired when used with the --html-report option. Traceback To Reproduce I took an example from the typing docs on TypedDict: ...

X Description: Crash Report Mypy crashes on a Python file that makes use of typing.NotRequired when used with the --html-report option. Traceback To Reproduce I took an example from the typing docs on TypedDict: ...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Mypy 1.11.0 crashes on typing.NotRequired with `--html-report`","articleBody":"\u003c!--\r\n  Use this form only if mypy reports an \"INTERNAL ERROR\" and/or gives a traceback.\r\n  Please include the traceback and all other messages below (use `mypy --show-traceback`).\r\n-->\r\n\r\n**Crash Report**\r\n\r\nMypy crashes on a Python file that makes use of `typing.NotRequired` when used with the `--html-report` option.\r\n\r\n**Traceback**\r\n\r\n\r\n\r\n**To Reproduce**\r\n\r\nI took an example from the `typing` docs on `TypedDict`:\r\n\r\n```python\r\nfrom typing import NotRequired, TypedDict\r\n\r\n\r\nclass Point2D(TypedDict):\r\n    x: int\r\n    y: int\r\n    label: NotRequired[str]\r\n```\r\n\r\nRunning mypy on it with `--html-report` causes a crash:\r\n\r\n```console\r\n(sandbox-312) sander@bedevere:~/documents/projects/python-sandbox$ mypy --html-report mypy --show-traceback reproduce.py\r\nreproduce.py: error: INTERNAL ERROR -- Please try using mypy master on GitHub:\r\nhttps://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build\r\nPlease report a bug at https://github.com/python/mypy/issues\r\nversion: 1.11.0\r\nTraceback (most recent call last):\r\n  File \"/home/sander/.virtualenvs/sandbox-312/bin/mypy\", line 8, in \u003cmodule>\r\n    sys.exit(console_entry())\r\n  File \"mypy/build.py\", line 2069, in wrap_context\r\nTypeError: mypy.types.ProperType object expected; got mypy.types.RequiredType\r\nreproduce.py: : note: use --pdb to drop into pdb\r\nGenerated HTML report (via XSLT): /home/sander/documents/projects/python-sandbox/mypy/index.html\r\n(sandbox-312) sander@bedevere:~/documents/projects/python-sandbox$ cat mypy/index.html\r\n\u003chtml>\r\n\u003chead>\r\n\u003cmeta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\r\n\u003clink rel=\"stylesheet\" type=\"text/css\" href=\"mypy-html.css\">\r\n\u003c/head>\r\n\u003cbody>\r\n\u003ch1>Mypy Type Check Coverage Summary\u003c/h1>\r\n\u003ctable class=\"summary\">\r\n\u003ccaption>Summary from index\u003c/caption>\r\n\u003cthead>\u003ctr class=\"summary\">\r\n\u003cth class=\"summary\">File\u003c/th>\r\n\u003cth class=\"summary\">Imprecision\u003c/th>\r\n\u003cth class=\"summary\">Lines\u003c/th>\r\n\u003c/tr>\u003c/thead>\r\n\u003ctfoot>\u003ctr class=\"summary summary-quality-0\">\r\n\u003cth class=\"summary summary-filename\">Total\u003c/th>\r\n\u003cth class=\"summary summary-precision\">0.00% imprecise\u003c/th>\r\n\u003cth class=\"summary summary-lines\">0 LOC\u003c/th>\r\n\u003c/tr>\u003c/tfoot>\r\n\u003ctbody>\u003c/tbody>\r\n\u003c/table>\r\n\u003c/body>\r\n\u003c/html>\r\n(sandbox-312) sander@bedevere:~/documents/projects/python-sandbox$ mypy --version\r\nmypy 1.11.0 (compiled: yes)\r\n```\r\n\r\nWhen I change the `NotRequired[str]` to plain `str`, mypy succeeds. The issue also doesn't occur without the `--html-report` option.\r\n\r\nI failed to reproduce the issue from a source installation, even from a checked out `v1.11.0` tag. But I get it consistently with the 1.11.0 version published to PyPi.\r\n\r\n\r\n**Your Environment**\r\n\r\n\u003c!-- Include as many relevant details about the environment you experienced the bug in -->\r\n\r\n- Mypy version used: 1.11.0 (from PyPi, could not reproduce from source installation, even from checked out v1.11.0 tag)\r\n- Mypy command-line flags: `--html-report mypy --show-traceback reproduce.py`\r\n- Mypy configuration options from `mypy.ini` (and other config files): none\r\n- Python version used: 3.11 and 3.12\r\n- Operating system and version: Arch Linux\r\n","author":{"url":"https://github.com/sanderr","@type":"Person","name":"sanderr"},"datePublished":"2024-07-30T09:48:09Z","url":"https://github.com/python/mypy/issues/17604"}

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:afc165b9-8528-7ecc-e664-42acce3f0767
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCC72:1A12A9:E227A2:12E5F60:6B005760
html-safe-noncec71e221f7f25546f1da47d6342b9dfe70acc05b8df7f92761fa3e282c7f7e6a7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzcyOjFBMTJBOTpFMjI3QTI6MTJFNUY2MDo2QjAwNTc2MCIsInZpc2l0b3JfaWQiOiI1NzA1ODE0NTgwODAyOTAxODU2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac47423316b39a886a84172d37588ab7ac11041fccb4ae069e7dcb8193b24323a1
hovercard-subject-tagissue:2437401427
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/17604/issue_layout
twitter:imagehttps://opengraph.githubassets.com/09fcff5a380e15091a753a3ff48dd32e36bfcbbabd8ee4cde50fcf1b542d9764/python/mypy/issues/17604
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/09fcff5a380e15091a753a3ff48dd32e36bfcbbabd8ee4cde50fcf1b542d9764/python/mypy/issues/17604
og:image:altCrash Report Mypy crashes on a Python file that makes use of typing.NotRequired when used with the --html-report option. Traceback To Reproduce I took an example from the typing docs on TypedDict: ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesanderr
hostnamegithub.com
expected-hostnamegithub.com
Nonef420f4996e6b1ff1ccd6d7683f8134f4b5f0f8a50124c210dbfe7490e5644abb
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
release26e00df917aba0f128135dc073ea0c5e33a70d40
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/mypy/issues/17604#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F17604
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%2F17604
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/17604
Reloadhttps://github.com/python/mypy/issues/17604
Reloadhttps://github.com/python/mypy/issues/17604
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/17604
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/17604
#17640https://github.com/python/mypy/pull/17640
Mypy 1.11.0 crashes on typing.NotRequired with --html-reporthttps://github.com/python/mypy/issues/17604#top
#17640https://github.com/python/mypy/pull/17640
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
topic-typed-dicthttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-typed-dict%22
https://github.com/sanderr
sanderrhttps://github.com/sanderr
on Jul 30, 2024https://github.com/python/mypy/issues/17604#issue-2437401427
sanderrhttps://github.com/sanderr
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
on Jul 30, 2024https://github.com/python/mypy/issues/17604#event-13693231932
https://github.com/nernst
nernsthttps://github.com/nernst
on Jul 30, 2024https://github.com/python/mypy/issues/17604#issuecomment-2258774307
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on Jul 30, 2024https://github.com/python/mypy/issues/17604#issuecomment-2258789904
@nernsthttps://github.com/nernst
JelleZijlstrahttps://github.com/JelleZijlstra
topic-typed-dicthttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-typed-dict%22
on Jul 30, 2024https://github.com/python/mypy/issues/17604#event-13698824141
JelleZijlstrahttps://github.com/JelleZijlstra
on Jul 30, 2024https://github.com/python/mypy/issues/17604#event-13698825630
https://github.com/andersk
anderskhttps://github.com/andersk
on Jul 30, 2024https://github.com/python/mypy/issues/17604#issuecomment-2259107896
e5b3b56https://github.com/python/mypy/commit/e5b3b563ea3f6d1f83d0fe3552965c8b05ea4c3d
#17495https://github.com/python/mypy/pull/17495
@nernsthttps://github.com/nernst
#17608https://github.com/python/mypy/issues/17608
anderskhttps://github.com/andersk
on Jul 30, 2024https://github.com/python/mypy/issues/17604#event-13701697260
Fix crash on unimported Any with Required/NotRequiredhttps://github.com/andersk/mypy/commit/f8d9715f33a517ffa284543a801051e985c38867
https://docs.github.com/articles/closing-issues-via-commit-messages
f8d9715https://github.com/andersk/mypy/commit/f8d9715f33a517ffa284543a801051e985c38867
Fix crash on unimported Any with Required/NotRequiredhttps://github.com/andersk/mypy/commit/071f0f37d3cf46a408ccc6c0e331e97ad9903ab0
https://docs.github.com/articles/closing-issues-via-commit-messages
071f0f3https://github.com/andersk/mypy/commit/071f0f37d3cf46a408ccc6c0e331e97ad9903ab0
ilevkivskyihttps://github.com/ilevkivskyi
completedhttps://github.com/python/mypy/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#17640https://github.com/python/mypy/pull/17640
on Aug 4, 2024https://github.com/python/mypy/issues/17604#event-13755555248
ilevkivskyihttps://github.com/ilevkivskyi
completedhttps://github.com/python/mypy/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
b56f357https://github.com/python/mypy/commit/b56f357a45838c204c951deeb6cbdbf143258e0c
on Aug 4, 2024https://github.com/python/mypy/issues/17604#event-13755555257
ilevkivskyihttps://github.com/ilevkivskyi
on Aug 4, 2024https://github.com/python/mypy/issues/17604#event-13755586358
Unwrap TypedDict item types before storing (python#17640)https://github.com/ilevkivskyi/mypy/commit/b56f357a45838c204c951deeb6cbdbf143258e0c
python#17640https://github.com/python/mypy/pull/17640
b56f357https://github.com/ilevkivskyi/mypy/commit/b56f357a45838c204c951deeb6cbdbf143258e0c
md384https://github.com/md384
on Aug 14, 2024https://github.com/python/mypy/issues/17604#event-13883184873
Unwrap TypedDict item types before storing (python#17640)https://github.com/md384/mypy/commit/7a9bd7e20d9b4b5af7c1e05967982fef05276ee4
python#17640https://github.com/python/mypy/pull/17640
7a9bd7ehttps://github.com/md384/mypy/commit/7a9bd7e20d9b4b5af7c1e05967982fef05276ee4
hauntsaninjahttps://github.com/hauntsaninja
on Aug 24, 2024https://github.com/python/mypy/issues/17604#event-14002276244
Unwrap TypedDict item types before storing (#17640)https://github.com/python/mypy/commit/7d805b364ee80396e0b9ca906f32f901b2ac7e12
#17640https://github.com/python/mypy/pull/17640
7d805b3https://github.com/python/mypy/commit/7d805b364ee80396e0b9ca906f32f901b2ac7e12
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/mypy/issues/17604
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/mypy/issues/17604
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
topic-typed-dicthttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-typed-dict%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.