A few comments between imports were removed or moved to the top of the
import block, due to behavioral differences between black and isort. See
psf/black#251 for details.
In two instances @overloads at the top of the file needed to be moved
due to psf/black#1490.
There are a couple other py39 changes to be made in asyncio, but I'm
trying to avoid merge issues with whitelists / Windows for now.
Co-authored-by: hauntsaninja <>
* asyncio: remove BaseChildWatcher from top level
* asyncio.sleep: loop is keyword-only
* asyncio: remove Server from top level
* asyncio: add FastChildWatcher to top level
* asyncio.constants: fix version availability
* asyncio: fix arg name for _wakeup
* asyncio: fix arg name for wrap_future
* asyncio.streams: add Optional to various arguments
It might be possible to further improve some of these with overloads.
* stubtest: fix whitelist
Co-authored-by: hauntsaninja <>
- connect_accepted_socket isn't a member of AbstractEventLoop, only
BaseEventLoop
- fix types of arguments with defaults. some of these functions could
have their signatures improved with overloads to reduce false negatives
- correctly mark a positional-only argument
- remove abstractmethod from methods that don't have abstractmethod and
go unimplemented in practice
The _types module can house any common type defintions used throughout
the rest of typeshed to keep defintions in sync.
First candidate is file descriptors where anything with `fileno()`
method is accepted. There were several different implementations in
various files that can be unified.
The documentation states:
* datagram_received: "data is a bytes object containing the incoming data."
* pipe_data_received: "data is a non-empty bytes object containing the received data."
Fix errors discovered by running typeshed check on Windows. This is a temporary fix for #3446 (in long term we should figure out why these were not caught by typeshed CI).
I also remove an outdated comment while I am at it.
* Add explicit ssl_handshake_timeout arguments to open_connection and start_server
* Add context arguments to call methods
* Accept PathLike for create_unix_* paths
* Add TimerHandle.when()
Add missing version check
* AbstractServer is now an async context manager
* Add happy_eyeballs_delay and interleave arguments to create_connection
* Re-export asyncio.windows_events from asyncio
* Add name argument to Task constructor
* Add Task.get_coro()
* import and other fixes
* Fix return type of get_coro()
* Add public missing asyncio stubs for windows and proactor files, and any necessary private return/argument types.
* Add methods to BaseProactorEventLoop that mypy is complaining about, with note about status at runtime
* Add asyncio constants file