-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
dmypy crash on followup check of file importing multiprocessing
#11795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Having looked at this again, it's actually worse. The crash appears to happen simply with an import of # Create the files
touch a.py
echo "import multiprocessing" > b.py
# Clean up any old daemon
dmypy kill || true
# Perform the first check
dmypy run -- --show-traceback a.py
# Perform the second check on a file containing "import multiprocessing"
dmypy run -- --show-traceback b.py
I will update the issue title accordingly. |
multiprocessing.util
multiprocessing
I can reproduce the issue. This seems to have been around for some time, at least from 0.900. |
I've just run into this issue and did some initial debugging. Mypy seems to get stuck inside of
Setting a breakpoint within
As you can see the ID of the |
A self-contained test case:
Unfortunately, this is a fundamental problem. Each time we look up a method, we call |
Actually I think there may be a simple short term solution for this. We can "anonimize" generic callables before comparisons. Anyway, their type variables are purely internal, and can leak only if there is a bug (like famous #1317) |
Fix #11795 The fix is straightforward (but ideally generic callables should be normalized in the first place, e.g. by better use of namespaces).
Crash Report
The
dmypy
daemon crashes if a check is performed on a file importingmultiprocessing.util
after an earlier check of any other set of files.If a check of a file importing of
multiprocessing.util
is the first check run using the daemon, the daemon does not crash and correctly errors that theutil
module is not present in themultiprocessing
typeshed
stubs:To Reproduce
Your Environment
Dependency versions:
mypy 0.940+dev.63abf4b5b26edb2c7db2a9ff50dfa0e63a43434a
. Also reproduced on0.920
.--show-traceback
mypy.ini
(and other config files): None3.9.8
The text was updated successfully, but these errors were encountered: