From 070489b91e2ece85134d9f2336f540c253165b77 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 17 Jun 2018 09:41:05 -0700 Subject: [PATCH] add io.TextIOWrapper.read in 3.3 This is needed to make TextIOWrapper and a few classes that inherit from it concrete in 3.3. I am actually not sure whether this method exists at runtime; there's nothing in https://docs.python.org/3/library/io.html#io.TextIOWrapper that suggests it was added in 3.4. In any case, it hardly matters since 3.3 usage should be very rare now. This appears to be the last typeshed change needed to unblock python/mypy#5223. @ilevkivskyi would you mind reviewing? --- stdlib/3/io.pyi | 1 + 1 file changed, 1 insertion(+) diff --git a/stdlib/3/io.pyi b/stdlib/3/io.pyi index b306b8ddd693..2a3121dd59fe 100644 --- a/stdlib/3/io.pyi +++ b/stdlib/3/io.pyi @@ -246,6 +246,7 @@ class TextIOWrapper(TextIO): def read(self, size: Optional[int] = ...) -> str: ... elif sys.version_info >= (3, 2): def readline(self, limit: int = ...) -> str: ... + def read(self, size: Optional[int] = ...) -> str: ... else: def readline(self) -> str: ... if sys.version_info >= (3, 2):