René's URL Explorer Experiment


Title: Cache causes mypy to fail every 2nd run for module importing from aws_cdk · Issue #9852 · python/mypy · GitHub

Open Graph Title: Cache causes mypy to fail every 2nd run for module importing from aws_cdk · Issue #9852 · python/mypy

X Title: Cache causes mypy to fail every 2nd run for module importing from aws_cdk · Issue #9852 · python/mypy

Description: Bug Report When mypy is run multiple times on a Python module containing from aws_cdk import core it will fail every 2nd time due to the error "Skipping analyzing 'aws_cdk': found module but no type hints or library stubs". Disabling the...

Open Graph Description: Bug Report When mypy is run multiple times on a Python module containing from aws_cdk import core it will fail every 2nd time due to the error "Skipping analyzing 'aws_cdk': found module but no typ...

X Description: Bug Report When mypy is run multiple times on a Python module containing from aws_cdk import core it will fail every 2nd time due to the error "Skipping analyzing 'aws_cdk': found modu...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cache causes mypy to fail every 2nd run for module importing from aws_cdk","articleBody":"**Bug Report**\r\n\r\nWhen `mypy` is run multiple times on a Python module containing `from aws_cdk import core` it will fail every 2nd time due to the error \"Skipping analyzing 'aws_cdk': found module but no type hints or library stubs\".\r\n\r\nDisabling the mypy cache with `--no-incremental` will result in `mypy` passing every time.\r\n\r\n**To Reproduce**\r\n\r\n1. Install `mypy` and `aws-cdk.core`.\r\n2. Create a Python module with `from aws_cdk import core`.\r\n3. Run `mypy` on the module and it will pass.\r\n4. Run `mypy` on the module again and it will fail. Subsequent runs will cycle between passing and failing.\r\n\r\n```\r\n$ python3.8 -m venv .venv && source .venv/bin/activate\r\n(.venv) $ pip install mypy==0.790 aws-cdk.core==1.80.0\r\n(.venv) $ echo 'from aws_cdk import core' > repro.py\r\n(.venv) $ mypy repro.py\r\nSuccess: no issues found in 1 source file\r\n(.venv) $ mypy repro.py\r\nrepro.py:1: error: Skipping analyzing 'aws_cdk': found module but no type hints or library stubs\r\nrepro.py:1: note: See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports\r\nFound 1 error in 1 file (checked 1 source file)\r\n(.venv) $ mypy repro.py\r\nSuccess: no issues found in 1 source file\r\n(.venv) $ mypy repro.py\r\nrepro.py:1: error: Skipping analyzing 'aws_cdk': found module but no type hints or library stubs\r\nrepro.py:1: note: See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports\r\nFound 1 error in 1 file (checked 1 source file)\r\n```\r\n\r\n**Expected Behavior**\r\n\r\nRunning `mypy` on a module containing only `from aws_cdk import core` should always pass.\r\n\r\n**Actual Behavior**\r\n\r\nEvery second time `mypy` is run on the module it will report an error.\r\n\r\n**Your Environment**\r\n\r\n- Mypy version used: 0.790\r\n- Mypy command-line flags: none\r\n- Mypy configuration options from `mypy.ini` (and other config files): none\r\n- Python version used: 3.8.2\r\n- Operating system and version: macOS\r\n- `aws-cdk.core` version used: 1.80.0\r\n\r\nThe problem may be related to how the package that is installed is `aws-cdk.core` but the namespace being imported from is `aws_cdk`. A workaround is to change:\r\n\r\n```python\r\nfrom aws_cdk import core\r\n```\r\n\r\nto:\r\n\r\n```python\r\nimport aws_cdk.core as core\r\n```\r\n\r\nThe first form is what is generated by [the `cdk` tool](https://docs.aws.amazon.com/cdk/latest/guide/hello_world.html#hello_world_tutorial_create_app) and used in the cdk [example code](https://github.com/aws-samples/aws-cdk-examples/tree/master/python).","author":{"url":"https://github.com/RobbieClarken","@type":"Person","name":"RobbieClarken"},"datePublished":"2020-12-29T13:43:39Z","url":"https://github.com/python/mypy/issues/9852"}

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:1f32e63b-2f4c-9386-6de4-d41476c99344
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id923E:1756E4:180A621:1FB4D6C:6B00274C
html-safe-nonce7b120547c21724095b975dd2a87ae463b4656b78483879ae019f014890b4847c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MjNFOjE3NTZFNDoxODBBNjIxOjFGQjRENkM6NkIwMDI3NEMiLCJ2aXNpdG9yX2lkIjoiNTI0MTQ4MzUzMTgzMzU4MzQzNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacb2346fc7dadfbe2eb459fb0666da82e759f05f4a545db5c2c8ee99421653807e
hovercard-subject-tagissue:775899026
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/9852/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a006ab73a183cca65c0ead8de3f4ac7d7d6042c25fca3fa421b5ea94badd5583/python/mypy/issues/9852
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a006ab73a183cca65c0ead8de3f4ac7d7d6042c25fca3fa421b5ea94badd5583/python/mypy/issues/9852
og:image:altBug Report When mypy is run multiple times on a Python module containing from aws_cdk import core it will fail every 2nd time due to the error "Skipping analyzing 'aws_cdk': found module but no typ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameRobbieClarken
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/9852#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F9852
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%2F9852
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/9852
Reloadhttps://github.com/python/mypy/issues/9852
Reloadhttps://github.com/python/mypy/issues/9852
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 requests547 (547)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/9852
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/9852
#10937https://github.com/python/mypy/pull/10937
Cache causes mypy to fail every 2nd run for module importing from aws_cdkhttps://github.com/python/mypy/issues/9852#top
#10937https://github.com/python/mypy/pull/10937
bugmypy got something wronghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22bug%22
good-second-issuehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22good-second-issue%22
priority-0-highhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-0-high%22
topic-incrementalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-incremental%22
https://github.com/RobbieClarken
RobbieClarkenhttps://github.com/RobbieClarken
on Dec 29, 2020https://github.com/python/mypy/issues/9852#issue-775899026
the cdk toolhttps://docs.aws.amazon.com/cdk/latest/guide/hello_world.html#hello_world_tutorial_create_app
example codehttps://github.com/aws-samples/aws-cdk-examples/tree/master/python
RobbieClarkenhttps://github.com/RobbieClarken
bugmypy got something wronghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22bug%22
on Dec 29, 2020https://github.com/python/mypy/issues/9852#event-4154678426
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
on Dec 30, 2020https://github.com/python/mypy/issues/9852#issuecomment-752373326
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
on Dec 30, 2020https://github.com/python/mypy/issues/9852#issuecomment-752374321
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
on Dec 30, 2020https://github.com/python/mypy/issues/9852#issuecomment-752375376
#9777https://github.com/python/mypy/issues/9777
hauntsaninjahttps://github.com/hauntsaninja
topic-incrementalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-incremental%22
on Dec 30, 2020https://github.com/python/mypy/issues/9852#event-4156631528
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
on Dec 30, 2020https://github.com/python/mypy/issues/9852#issuecomment-752377100
#7276https://github.com/python/mypy/issues/7276
https://github.com/KaleabTessera
KaleabTesserahttps://github.com/KaleabTessera
on Apr 15, 2021https://github.com/python/mypy/issues/9852#issuecomment-820535786
hauntsaninjahttps://github.com/hauntsaninja
priority-0-highhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-0-high%22
on Apr 27, 2021https://github.com/python/mypy/issues/9852#event-4652942604
https://github.com/ssbarnea
ssbarneahttps://github.com/ssbarnea
on Jul 5, 2021https://github.com/python/mypy/issues/9852#issuecomment-874091696
pre-commit/pre-commit#1966https://github.com/pre-commit/pre-commit/issues/1966
https://github.com/Cnoor0171
Cnoor0171https://github.com/Cnoor0171
on Aug 2, 2021https://github.com/python/mypy/issues/9852#issuecomment-891383889
@ssbarneahttps://github.com/ssbarnea
https://github.com/ssbarnea
ssbarneahttps://github.com/ssbarnea
on Aug 3, 2021https://github.com/python/mypy/issues/9852#issuecomment-891537962
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
on Aug 3, 2021https://github.com/python/mypy/issues/9852#issuecomment-891595841
#10056https://github.com/python/mypy/issues/10056
#7276https://github.com/python/mypy/issues/7276
#9852https://github.com/python/mypy/issues/9852
#9777https://github.com/python/mypy/issues/9777
#10906https://github.com/python/mypy/issues/10906
#10376https://github.com/python/mypy/issues/10376
#10644https://github.com/python/mypy/issues/10644
#10906https://github.com/python/mypy/issues/10906
@msullivanhttps://github.com/msullivan
#10056https://github.com/python/mypy/issues/10056
#4910https://github.com/python/mypy/pull/4910
#5016https://github.com/python/mypy/pull/5016
msullivanhttps://github.com/msullivan
on Aug 4, 2021https://github.com/python/mypy/issues/9852#event-5113714242
Add an xfailed test for issue #9852https://github.com/python/mypy/commit/515e84f7303ece1d741fe718123b6ba0b8ded487
#9852https://github.com/python/mypy/issues/9852
515e84fhttps://github.com/python/mypy/commit/515e84f7303ece1d741fe718123b6ba0b8ded487
Add an xfailed test for issue #9852 (#10932)https://github.com/python/mypy/commit/869f7b447d850f8b9607ea93e6f891954a781237
#9852https://github.com/python/mypy/issues/9852
#10932https://github.com/python/mypy/pull/10932
869f7b4https://github.com/python/mypy/commit/869f7b447d850f8b9607ea93e6f891954a781237
https://github.com/emmatyping
emmatypinghttps://github.com/emmatyping
on Aug 5, 2021https://github.com/python/mypy/issues/9852#issuecomment-893364594
msullivanhttps://github.com/msullivan
on Aug 6, 2021https://github.com/python/mypy/issues/9852#event-5120380479
Fix caching behavior of PEP561-installed namespace packageshttps://github.com/python/mypy/commit/4269071113dc754def1dbfa14e0b9befd0c21ec1
https://docs.github.com/articles/closing-issues-via-commit-messages
4269071https://github.com/python/mypy/commit/4269071113dc754def1dbfa14e0b9befd0c21ec1
Fix caching behavior of PEP561-installed namespace packageshttps://github.com/python/mypy/commit/09a97fa8186de95881dd7d45b3a0f481bb907b86
https://docs.github.com/articles/closing-issues-via-commit-messages
09a97fahttps://github.com/python/mypy/commit/09a97fa8186de95881dd7d45b3a0f481bb907b86
hauntsaninjahttps://github.com/hauntsaninja
completedhttps://github.com/python/mypy/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#10937https://github.com/python/mypy/pull/10937
on Aug 6, 2021https://github.com/python/mypy/issues/9852#event-5124587217
hauntsaninjahttps://github.com/hauntsaninja
on Aug 6, 2021https://github.com/python/mypy/issues/9852#event-5124587424
Fix caching behavior of PEP561-installed namespace packages (#10937)https://github.com/python/mypy/commit/c90026bd867635a4efe70cdacf0caaf00a986914
#10937https://github.com/python/mypy/pull/10937
https://docs.github.com/articles/closing-issues-via-commit-messages
c90026bhttps://github.com/python/mypy/commit/c90026bd867635a4efe70cdacf0caaf00a986914
bonzinihttps://github.com/bonzini
on Nov 1, 2021https://github.com/python/mypy/issues/9852#event-5550742118
iotests/linters: Add workaround for mypy bug #9852https://github.com/qemu/qemu/commit/558dbe9935445af6ab20e18b3664ba6c43eb2311
558dbe9https://github.com/qemu/qemu/commit/558dbe9935445af6ab20e18b3664ba6c43eb2311
stsquadhttps://github.com/stsquad
on Nov 2, 2021https://github.com/python/mypy/issues/9852#event-5558319074
iotests/linters: Add workaround for mypy bug #9852https://github.com/stsquad/qemu/commit/30aca417c126ea16b1cce93cdcc824940aa9cf9c
30aca41https://github.com/stsquad/qemu/commit/30aca417c126ea16b1cce93cdcc824940aa9cf9c
https://github.com/nacitar
nacitarhttps://github.com/nacitar
on Dec 7, 2021https://github.com/python/mypy/issues/9852#issuecomment-988182954
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on Dec 7, 2021https://github.com/python/mypy/issues/9852#issuecomment-988197598
https://github.com/MaxG87
MaxG87https://github.com/MaxG87
on Feb 21, 2022https://github.com/python/mypy/issues/9852#issuecomment-1047029568
abovehttps://github.com/python/mypy/issues/9852#issuecomment-891595841
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
on Feb 21, 2022https://github.com/python/mypy/issues/9852#issuecomment-1047244860
hauntsaninjahttps://github.com/hauntsaninja
good-second-issuehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22good-second-issue%22
on Mar 24, 2022https://github.com/python/mypy/issues/9852#event-6302600876
samhenrigoldhttps://github.com/samhenrigold
on Oct 5, 2026https://github.com/python/mypy/issues/9852#event-32467532788
iotests/linters: Add workaround for mypy bug #9852https://github.com/samhenrigold/qemu-ios/commit/0aa9c9ad654c0a3880cc8553cd9d617bc0e09fe7
0aa9c9ahttps://github.com/samhenrigold/qemu-ios/commit/0aa9c9ad654c0a3880cc8553cd9d617bc0e09fe7
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/mypy/issues/9852
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/mypy/issues/9852
bugmypy got something wronghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22bug%22
good-second-issuehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22good-second-issue%22
priority-0-highhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-0-high%22
topic-incrementalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-incremental%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.