{"action":"created","issue":{"url":"https://api.github.com/repos/python/typeshed/issues/452","repository_url":"https://api.github.com/repos/python/typeshed","labels_url":"https://api.github.com/repos/python/typeshed/issues/452/labels{/name}","comments_url":"https://api.github.com/repos/python/typeshed/issues/452/comments","events_url":"https://api.github.com/repos/python/typeshed/issues/452/events","html_url":"https://github.com/python/typeshed/issues/452","id":169744196,"number":452,"title":"asyncio.BaseEventLoop missing","user":{"login":"toejough","id":5317312,"avatar_url":"https://avatars.githubusercontent.com/u/5317312?v=3","gravatar_id":"","url":"https://api.github.com/users/toejough","html_url":"https://github.com/toejough","followers_url":"https://api.github.com/users/toejough/followers","following_url":"https://api.github.com/users/toejough/following{/other_user}","gists_url":"https://api.github.com/users/toejough/gists{/gist_id}","starred_url":"https://api.github.com/users/toejough/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toejough/subscriptions","organizations_url":"https://api.github.com/users/toejough/orgs","repos_url":"https://api.github.com/users/toejough/repos","events_url":"https://api.github.com/users/toejough/events{/privacy}","received_events_url":"https://api.github.com/users/toejough/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-06T12:15:13Z","updated_at":"2016-08-06T16:44:14Z","closed_at":null,"body":"The [current docs](https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.BaseEventLoop) say that `asyncio.BaseEventLoop` is the base class for all asyncio event loops, but this definition is missing from the typeshed [stubs for asyncio](https://github.com/python/typeshed/blob/master/stdlib/3.4/asyncio/__init__.pyi).\r\n\r\nThis results in mypy reporting `error: Name 'asyncio.BaseEventLoop' is not defined` when you check code like `def get_or_create_event_loop() -> asyncio.BaseEventLoop`.\r\n\r\nVerified this class does exist and is callable as `asyncio.BaseEventLoop` with python 3.5.2:\r\n\r\n```shell\r\n> python\r\nPython 3.5.2 (default, Jul 28 2016, 21:28:00)\r\n[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import asyncio\r\n>>> asyncio.BaseEventLoop\r\n<class 'asyncio.base_events.BaseEventLoop'>\r\n>>>\r\n```\r\n\r\nThis is with the latest mypy from github, and the latest typeshed as a submodule:\r\n```shell\r\n> mypy --version\r\nmypy 0.4.4-dev-72317c32c65cf318883a4c2ebec6ed9e065c2bfd\r\n>\r\n```"},"comment":{"url":"https://api.github.com/repos/python/typeshed/issues/comments/238032784","html_url":"https://github.com/python/typeshed/issues/452#issuecomment-238032784","issue_url":"https://api.github.com/repos/python/typeshed/issues/452","id":238032784,"user":{"login":"gvanrossum","id":2894642,"avatar_url":"https://avatars.githubusercontent.com/u/2894642?v=3","gravatar_id":"","url":"https://api.github.com/users/gvanrossum","html_url":"https://github.com/gvanrossum","followers_url":"https://api.github.com/users/gvanrossum/followers","following_url":"https://api.github.com/users/gvanrossum/following{/other_user}","gists_url":"https://api.github.com/users/gvanrossum/gists{/gist_id}","starred_url":"https://api.github.com/users/gvanrossum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gvanrossum/subscriptions","organizations_url":"https://api.github.com/users/gvanrossum/orgs","repos_url":"https://api.github.com/users/gvanrossum/repos","events_url":"https://api.github.com/users/gvanrossum/events{/privacy}","received_events_url":"https://api.github.com/users/gvanrossum/received_events","type":"User","site_admin":false},"created_at":"2016-08-06T16:44:14Z","updated_at":"2016-08-06T16:44:14Z","body":"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 `@abstractmethod` decorators taken out)."}}
{"actor":{"display_login":"gvanrossum"}}