asyncio.Server.socket fixes (#5538)

* Move socket from AbstractServer to Server.
* Fix Server.socket type on Python 3.7+.
* Use Iterable instead of list for socket argument.

Closes: #5535
This commit is contained in:
Sebastian Rittau
2021-05-27 16:14:36 +02:00
committed by GitHub
parent 038556cb7e
commit ca256b85b9
2 changed files with 11 additions and 3 deletions

View File

@@ -53,7 +53,6 @@ class TimerHandle(Handle):
def when(self) -> float: ...
class AbstractServer:
sockets: Optional[List[socket]]
def close(self) -> None: ...
if sys.version_info >= (3, 7):
async def __aenter__(self: _T) -> _T: ...