René's URL Explorer Experiment


Title: Another AssertionError with TypedDict and --cache-fine-grained in v1.11.0 · Issue #17587 · python/mypy · GitHub

Open Graph Title: Another AssertionError with TypedDict and --cache-fine-grained in v1.11.0 · Issue #17587 · python/mypy

X Title: Another AssertionError with TypedDict and --cache-fine-grained in v1.11.0 · Issue #17587 · python/mypy

Description: dmypy crashes on import stripe, and I reduced the failure to the minimal test case below with no external dependencies. This is similar to #17515, but it remains a problem on current master (e67decb) even after #17515 was marked fixed. T...

Open Graph Description: dmypy crashes on import stripe, and I reduced the failure to the minimal test case below with no external dependencies. This is similar to #17515, but it remains a problem on current master (e67dec...

X Description: dmypy crashes on import stripe, and I reduced the failure to the minimal test case below with no external dependencies. This is similar to #17515, but it remains a problem on current master (e67dec...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Another AssertionError with TypedDict and --cache-fine-grained in v1.11.0","articleBody":"`dmypy` crashes on `import stripe`, and I reduced the failure to the minimal test case below with no external dependencies. This is similar to\r\n\r\n- #17515,\r\n\r\nbut it remains a problem on current `master` (e67decb91ea5aacbb1e126463b02d78ded680a90) even after #17515 was marked fixed. This is a regression in v1.11.0, and `git bisect` shows it was introduced by 1072c78ad375b7f0511549287f54432050396717 (#17148, cc @JelleZijlstra).\r\n\r\n**`test.py`**\r\n\r\n```python\r\nfrom typing import TypedDict\r\n\r\nclass A(TypedDict):\r\n    b: \"B\"\r\n\r\nclass B(TypedDict):\r\n    c: \"C\"\r\n\r\nclass C(TypedDict):\r\n    d: \"D\"\r\n\r\nclass D:\r\n    pass\r\n```\r\n\r\n```pytb\r\n$ mypy --show-traceback --cache-fine-grained test.py\r\ntest.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.12.0+dev.e67decb91ea5aacbb1e126463b02d78ded680a90\r\nTraceback (most recent call last):\r\n  File \"/tmp/venv/bin/mypy\", line 8, in \u003cmodule>\r\n    sys.exit(console_entry())\r\n  File \"/home/anders/python/mypy/mypy/__main__.py\", line 15, in console_entry\r\n    main()\r\n  File \"/home/anders/python/mypy/mypy/main.py\", line 103, in main\r\n    res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)\r\n  File \"/home/anders/python/mypy/mypy/main.py\", line 187, in run_build\r\n    res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)\r\n  File \"/home/anders/python/mypy/mypy/build.py\", line 193, in build\r\n    result = _build(\r\n  File \"/home/anders/python/mypy/mypy/build.py\", line 268, in _build\r\n    graph = dispatch(sources, manager, stdout)\r\n  File \"/home/anders/python/mypy/mypy/build.py\", line 2950, in dispatch\r\n    process_graph(graph, manager)\r\n  File \"/home/anders/python/mypy/mypy/build.py\", line 3348, in process_graph\r\n    process_stale_scc(graph, scc, manager)\r\n  File \"/home/anders/python/mypy/mypy/build.py\", line 3453, in process_stale_scc\r\n    graph[id].finish_passes()\r\n  File \"/home/anders/python/mypy/mypy/build.py\", line 2372, in finish_passes\r\n    with self.wrap_context():\r\n  File \"/nix/store/z7xxy35k7620hs6fn6la5fg2lgklv72l-python3-3.12.4/lib/python3.12/contextlib.py\", line 158, in __exit__\r\n    self.gen.throw(value)\r\n  File \"/home/anders/python/mypy/mypy/build.py\", line 2069, in wrap_context\r\n    yield\r\n  File \"/home/anders/python/mypy/mypy/build.py\", line 2409, in finish_passes\r\n    self.update_fine_grained_deps(self.manager.fg_deps)\r\n  File \"/home/anders/python/mypy/mypy/build.py\", line 2467, in update_fine_grained_deps\r\n    merge_dependencies(self.compute_fine_grained_deps(), deps)\r\n                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/anders/python/mypy/mypy/build.py\", line 2455, in compute_fine_grained_deps\r\n    return get_dependencies(\r\n           ^^^^^^^^^^^^^^^^^\r\n  File \"/home/anders/python/mypy/mypy/server/deps.py\", line 187, in get_dependencies\r\n    target.accept(visitor)\r\n  File \"/home/anders/python/mypy/mypy/nodes.py\", line 372, in accept\r\n    return visitor.visit_mypy_file(self)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/anders/python/mypy/mypy/server/deps.py\", line 250, in visit_mypy_file\r\n    super().visit_mypy_file(o)\r\n  File \"/home/anders/python/mypy/mypy/traverser.py\", line 116, in visit_mypy_file\r\n    d.accept(self)\r\n  File \"/home/anders/python/mypy/mypy/nodes.py\", line 1183, in accept\r\n    return visitor.visit_class_def(self)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/anders/python/mypy/mypy/server/deps.py\", line 310, in visit_class_def\r\n    super().visit_class_def(o)\r\n  File \"/home/anders/python/mypy/mypy/traverser.py\", line 152, in visit_class_def\r\n    o.defs.accept(self)\r\n  File \"/home/anders/python/mypy/mypy/nodes.py\", line 1264, in accept\r\n    return visitor.visit_block(self)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/anders/python/mypy/mypy/server/deps.py\", line 429, in visit_block\r\n    super().visit_block(o)\r\n  File \"/home/anders/python/mypy/mypy/traverser.py\", line 120, in visit_block\r\n    s.accept(self)\r\n  File \"/home/anders/python/mypy/mypy/nodes.py\", line 1351, in accept\r\n    return visitor.visit_assignment_stmt(self)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/anders/python/mypy/mypy/server/deps.py\", line 490, in visit_assignment_stmt\r\n    self.add_type_dependencies(o.type)\r\n  File \"/home/anders/python/mypy/mypy/server/deps.py\", line 887, in add_type_dependencies\r\n    for trigger in self.get_type_triggers(typ):\r\n                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/anders/python/mypy/mypy/server/deps.py\", line 940, in get_type_triggers\r\n    return get_type_triggers(typ, self.use_logical_deps())\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/anders/python/mypy/mypy/server/deps.py\", line 947, in get_type_triggers\r\n    return typ.accept(TypeTriggersVisitor(use_logical_deps, seen_aliases))\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/anders/python/mypy/mypy/types.py\", line 2708, in accept\r\n    assert isinstance(visitor, SyntheticTypeVisitor)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\nAssertionError: \r\ntest.py: : note: use --pdb to drop into pdb\r\n```\r\n","author":{"url":"https://github.com/andersk","@type":"Person","name":"andersk"},"datePublished":"2024-07-26T01:54:06Z","url":"https://github.com/python/mypy/issues/17587"}

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:4e5e5cf0-7bc9-1622-a981-e31d3a10f55a
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB656:91831:FD63B:161F8F:6B0063EA
html-safe-noncedf887730418fca538a3edaf6c5af3622c81f5b1ee207ebeb00c2802ca9996e21
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjU2OjkxODMxOkZENjNCOjE2MUY4Rjo2QjAwNjNFQSIsInZpc2l0b3JfaWQiOiI3NjI1ODI5NTI4MDgxODE4NjAyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacc19576ac9f3d4a513e88a5cbccbcd639a22131412e75db73e8a31f9109993489
hovercard-subject-tagissue:2431260323
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/17587/issue_layout
twitter:imagehttps://opengraph.githubassets.com/8c952f8e738396750a230185b24a82d721216f719bd30472d4569570191ac5f9/python/mypy/issues/17587
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8c952f8e738396750a230185b24a82d721216f719bd30472d4569570191ac5f9/python/mypy/issues/17587
og:image:altdmypy crashes on import stripe, and I reduced the failure to the minimal test case below with no external dependencies. This is similar to #17515, but it remains a problem on current master (e67dec...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameandersk
hostnamegithub.com
expected-hostnamegithub.com
None25854482a1773a7c1ebb8be3d2bc1c6e61d82d78126be63b5044474a86d44d9e
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
releasee4f5c239e31f1f680e6bbc419ff92d774da616ec
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/mypy/issues/17587#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F17587
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%2F17587
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/17587
Reloadhttps://github.com/python/mypy/issues/17587
Reloadhttps://github.com/python/mypy/issues/17587
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 requests543 (543)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/17587
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/17587
#17588https://github.com/python/mypy/pull/17588
Another AssertionError with TypedDict and --cache-fine-grained in v1.11.0https://github.com/python/mypy/issues/17587#top
#17588https://github.com/python/mypy/pull/17588
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
https://github.com/andersk
anderskhttps://github.com/andersk
on Jul 26, 2024https://github.com/python/mypy/issues/17587#issue-2431260323
AssertionError with TypedDict and --cache-fine-grained in v1.11.0 #17515https://github.com/python/mypy/issues/17515
e67decbhttps://github.com/python/mypy/commit/e67decb91ea5aacbb1e126463b02d78ded680a90
#17515https://github.com/python/mypy/issues/17515
1072c78https://github.com/python/mypy/commit/1072c78ad375b7f0511549287f54432050396717
#17148https://github.com/python/mypy/pull/17148
@JelleZijlstrahttps://github.com/JelleZijlstra
anderskhttps://github.com/andersk
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
on Jul 26, 2024https://github.com/python/mypy/issues/17587#event-13654806763
anderskhttps://github.com/andersk
on Jul 26, 2024https://github.com/python/mypy/issues/17587#event-13655138256
Fix RawExpressionType.accept crash with --cache-fine-grainedhttps://github.com/andersk/mypy/commit/a0103b9a0051a9f82efa96a632552b25075a072b
https://docs.github.com/articles/closing-issues-via-commit-messages
a0103b9https://github.com/andersk/mypy/commit/a0103b9a0051a9f82efa96a632552b25075a072b
Fix RawExpressionType.accept crash with --cache-fine-grainedhttps://github.com/andersk/mypy/commit/500620484d0e12fd875ebb801a61b6c881820897
https://docs.github.com/articles/closing-issues-via-commit-messages
5006204https://github.com/andersk/mypy/commit/500620484d0e12fd875ebb801a61b6c881820897
https://github.com/andersk
anderskhttps://github.com/andersk
on Jul 26, 2024https://github.com/python/mypy/issues/17587#issuecomment-2251862485
Fix RawExpressionType.accept crash with --cache-fine-grained #17588https://github.com/python/mypy/pull/17588
JelleZijlstrahttps://github.com/JelleZijlstra
completedhttps://github.com/python/mypy/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#17588https://github.com/python/mypy/pull/17588
on Jul 26, 2024https://github.com/python/mypy/issues/17587#event-13666748570
JelleZijlstrahttps://github.com/JelleZijlstra
completedhttps://github.com/python/mypy/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
8b74b5ahttps://github.com/python/mypy/commit/8b74b5ab03742ba86348dfe14d0468a995f74ee7
on Jul 26, 2024https://github.com/python/mypy/issues/17587#event-13666748593
pullhttps://github.com/apps/pull
on Jul 27, 2024https://github.com/python/mypy/issues/17587#event-13666980155
Fix `RawExpressionType.accept` crash with `--cache-fine-grained` (pyt…https://github.com/sysfce2/mypy/commit/8b74b5ab03742ba86348dfe14d0468a995f74ee7
pyt…https://github.com/python/mypy/pull/17588
https://docs.github.com/articles/closing-issues-via-commit-messages
8b74b5ahttps://github.com/sysfce2/mypy/commit/8b74b5ab03742ba86348dfe14d0468a995f74ee7
hauntsaninjahttps://github.com/hauntsaninja
on Jul 27, 2024https://github.com/python/mypy/issues/17587#event-13666998415
Fix `RawExpressionType.accept` crash with `--cache-fine-grained` (#17588https://github.com/python/mypy/commit/b3a102ef31f63a8a8ba32c8dbe160ddef3c43054
#17588https://github.com/python/mypy/pull/17588
https://docs.github.com/articles/closing-issues-via-commit-messages
b3a102ehttps://github.com/python/mypy/commit/b3a102ef31f63a8a8ba32c8dbe160ddef3c43054
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/mypy/issues/17587
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/mypy/issues/17587
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%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.