-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
asyncio.BaseEventLoop missing #452
Comments
IIRC the PEP (3156) only has AbstractEventLoop. As a wotkaround you can use On Saturday, August 6, 2016, toejough notifications@github.com wrote:
--Guido (mobile) |
Yes, I am using that and things are working well - thank you! |
Ah, so I think the problem here is the CPython docs for asyncio. While PEP 3156 only mentions AbstractEventLoop, the CPython docs only mention BaseEventLoop. I filed http://bugs.python.org/issue27700 to correct the CPython docs. But in the meantime maybe we should export BaseEventLoop as well? Do you have the time and energy to submit a PR for this purpose? (Unfortunately it will have to be pretty much a copy of AbstractEventLoop with all the |
Sure - I'll make some time to submit a PR this week. |
The CPython docs have been fixed to use AbstractEventLoop now. Should we still keep this open? |
nope, this can definitely be closed. Sorry I never got around to it myself 👎 |
The current docs say that
asyncio.BaseEventLoop
is the base class for all asyncio event loops, but this definition is missing from the typeshed stubs for asyncio.This results in mypy reporting
error: Name 'asyncio.BaseEventLoop' is not defined
when you check code likedef get_or_create_event_loop() -> asyncio.BaseEventLoop
.Verified this class does exist and is callable as
asyncio.BaseEventLoop
with python 3.5.2:This is with the latest mypy from github, and the latest typeshed as a submodule:
The text was updated successfully, but these errors were encountered: