KEMBAR78
Fix couple crashes in dmypy by ilevkivskyi · Pull Request #18098 · python/mypy · GitHub
Skip to content

Conversation

ilevkivskyi
Copy link
Member

Fixes #18019
Fixes #17775

These two are essentially variations of the same thing. Instead of adding e.g. types to SENSITIVE_INTERNAL_MODULES (which would be fragile and re-introduce same crashes whenever we add a new "core" module) I add all stdlib modules. The only scenario when stdlib changes is when a version of mypy changes, and in this case the daemon will be (or should be) restarted anyway.

While adding tests for these I noticed a discrepancy in --follow-imports=normal in the daemon: the files explicitly added on the command line should be always treated as changed, since otherwise we will not detect errors if a file was removed from command line in an intermediate run.

Finally the tests also discovered a spurious error when cache is disabled (via /dev/null).

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2024

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

@hauntsaninja
Copy link
Collaborator

Nice, thanks for fixing!

@hauntsaninja
Copy link
Collaborator

By the way, there's another similar follow imports related discrepancy in daemon #15677

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!

@JukkaL JukkaL merged commit 976d105 into python:master Nov 4, 2024
19 checks passed
@ilevkivskyi ilevkivskyi deleted the daemon-no-std branch November 4, 2024 13:44
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.

dmypy crashes on checking a couple files dmypy crashes on module check after checking one of its imports

3 participants