-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Strange errors when trying to type-check asyncio #1050
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
Hmm.. this looks like it could be caused a potential bug we found when browsing mypy code ( This is still a guess, but fixing dependency handling for dependency cycles may fix this. I'll look into this in more detail. The involved code is unclear anyway so even if this isn't the cause of this bug, it's worth refactoring or commenting the relevant code. |
I think I figured this out. |
Anyway we probably won't want typing to import asyncio as it'll bring in a ton of code at runtime that'll slow down program startup for most programs. |
Eww, this was introduced by python/typeshed#30 . I'll look into a better way of doing this. |
(So, if you're interested, running mypy on asyncio gets a lot of errors due to missing stubs and mypy bugs (asyncio loves conditional definitions) but it also found two bugs: a missing import and a missing exception definition, both in asyncio/test_support.py. Interestingly, that module is a "backup" for functionality that's usually in the stdlib, so it clearly didn't get exercised as much...) |
When running mypy over the stand-alone asyncio package (https://github.com/python/asyncio) using
mypy asyncio
I get some unexpected errors about uses of AnyStr in the stub for struct.pyi. I can't repro this easily in a smaller context, and in fact it doesn't repro of I point mypy at just asyncio/windows_events.py either. @JukkaL, do you have any idea what might be going on here?The text was updated successfully, but these errors were encountered: