From e4cadbede33a699bc45aa3c5bce5e2502768a318 Mon Sep 17 00:00:00 2001 From: Kaushal Rohit Date: Sat, 10 Oct 2020 15:50:31 +0530 Subject: [PATCH] added typing.io module --- stdlib/3/typing.pyi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/stdlib/3/typing.pyi b/stdlib/3/typing.pyi index a3f46e9b5ac2..4eea3339f18f 100644 --- a/stdlib/3/typing.pyi +++ b/stdlib/3/typing.pyi @@ -663,3 +663,13 @@ if sys.version_info >= (3, 7): def __eq__(self, other: Any) -> bool: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... + +class io: # deprecated, use typing.IO, typing.TextIO, typing.BinaryIO + """Wrapper namespace for IO generic classes.""" + + __all__ = ['IO', 'TextIO', 'BinaryIO'] + # Union is a workaround to create type aliases in classes + # can be replaced with TypeAlias for Python > 3.10 + IO = Union[IO] + TextIO = Union[TextIO] + BinaryIO = Union[BinaryIO]