Add typehints for the following `asyncio.subprocess.Process` attributes:
- `stdin`: `Optional[asyncio.streams.StreamWriter]`
- `stdout`: `Optional[asyncio.streams.StreamReader]`
- `stderr`: `Optional[asyncio.streams.StreamReader]`
- `pid`: `int`
Include stdin, stdout, and stderr also in SSP.
* Add missing kwargs for create_server and create_datagram_endpoint
Looks like `create_server` and `create_datagram_endpoint` have supported `reuse_port`, `reuse_address`, and `sock` since 3.4.
https://docs.python.org/3.4/library/asyncio-eventloop.htmlee51327a23/Lib/asyncio/events.py
* Fixes to create_server, create_datagram_endpoing
- Add allow sequence for `hosts` in `create_server`
- Add `allow_broadcast` to `create_datagram_endpoint`
- Reorder `sock` in `create_datagram_endpoint`
* Import Sequence
* Sockets are Optionals
* add stubs for tracemalloc
This one has especially nice documentation, even including type annotations.
* no PEP 526 so I can run tests locally
* fixes
* another one
"> (3,)" works but looks like the code is checking for Python 4.
"<= (3, 5)" was intended to check for versions up to and including 3.5, and probably works that
way in current type checkers. However, sys.version_info is actually a 5-tuple that is greater
than (3, 5), so a hypothetical type checker that uses the full version info would interpret
this check incorrectly.
This ensures that all version_info comparisons use <, >=, ==, or !=.
Closes#953.
I reviewed the documentation at https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.AbstractEventLoop and added missing methods and missing @coroutine decorators.
I ran mypy on the sample file from the issue report to confirm that mypy handles the combination of @abstractmethod and @coroutine correctly.
Also fixed a number of types in this file that are annotated as Any but could be given more precise types (e.g., sockets and protocol factories).
The code for this method starts as follows:
```
@coroutine
def communicate(self, input=None):
if input is not None:
stdin = self._feed_stdin(input)
```
* Define __slots__ for object as Iterable[str] / Iterable[Union[str, unicode]]
* A string as __slots__ value is also valid and represents a single item
Several asyncio AbstractEventLoop methods take a callback as
an argument that is passed *args. The Callable definition was
incorrect for those callbacks.