Skip to content

Conversation

@ilevkivskyi
Copy link
Member

Fixes #7277

This mirrors an old fix for the opposite scenario. Note that although it looks like this PR will make performance impact it should not, because a missing dependency that is present in cache means stale cache anyway.

Note I also make a tiny correctness tweak in the old fix mentioned above: follow_imports is a per-module option so it must be cloned for the module being imported, not for the importer. This still leaves a tiny correctness issue I describe in the comment, but I don't think it is possible to fix it without massive performance penalty, and it probably doesn't affect anyone anyway.

@github-actions
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing another high-pri bug!

@ilevkivskyi ilevkivskyi merged commit 92a7858 into python:master Feb 12, 2026
23 checks passed
@ilevkivskyi ilevkivskyi deleted the fix-incre-submod-del branch February 12, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incremental mode confusion about deleted module imported with import from

2 participants