diff --git a/stdlib/3.4/asyncio/protocols.pyi b/stdlib/3.4/asyncio/protocols.pyi index 9fcff65c0..a716af7ef 100644 --- a/stdlib/3.4/asyncio/protocols.pyi +++ b/stdlib/3.4/asyncio/protocols.pyi @@ -1,5 +1,5 @@ from asyncio import transports -from typing import AnyStr, List, Tuple +from typing import List, Text, Tuple, Union __all__: List[str] @@ -15,10 +15,10 @@ class Protocol(BaseProtocol): def eof_received(self) -> bool: ... class DatagramProtocol(BaseProtocol): - def datagram_received(self, data: AnyStr, addr: Tuple[str, int]) -> None: ... + def datagram_received(self, data: Union[bytes, Text], addr: Tuple[str, int]) -> None: ... def error_received(self, exc: Exception) -> None: ... class SubprocessProtocol(BaseProtocol): - def pipe_data_received(self, fd: int, data: AnyStr) -> None: ... + def pipe_data_received(self, fd: int, data: Union[bytes, Text]) -> None: ... def pipe_connection_lost(self, fd: int, exc: Exception) -> None: ... def process_exited(self) -> None: ... diff --git a/stdlib/3.4/asyncio/subprocess.pyi b/stdlib/3.4/asyncio/subprocess.pyi index 78feb8e20..ab2ecd8d8 100644 --- a/stdlib/3.4/asyncio/subprocess.pyi +++ b/stdlib/3.4/asyncio/subprocess.pyi @@ -3,7 +3,7 @@ from asyncio import protocols from asyncio import streams from asyncio import transports from asyncio.coroutines import coroutine -from typing import Any, AnyStr, Generator, List, Optional, Tuple, Union, IO +from typing import Any, Generator, List, Optional, Text, Tuple, Union, IO __all__: List[str] @@ -18,7 +18,7 @@ class SubprocessStreamProtocol(streams.FlowControlMixin, stderr = ... # type: Optional[streams.StreamReader] def __init__(self, limit: int, loop: events.AbstractEventLoop) -> None: ... def connection_made(self, transport: transports.BaseTransport) -> None: ... - def pipe_data_received(self, fd: int, data: AnyStr) -> None: ... + def pipe_data_received(self, fd: int, data: Union[bytes, Text]) -> None: ... def pipe_connection_lost(self, fd: int, exc: Exception) -> None: ... def process_exited(self) -> None: ...