Skip to content

Commit 0336639

Browse files
committed
add conditional fix for io
1 parent a779e0a commit 0336639

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

stdlib/3/io.pyi

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,19 @@ if sys.version_info >= (3, 1):
1717

1818
open = builtins.open
1919

20-
if sys.version_info >= (3, 3):
21-
BlockingIOError = BlockingIOError
22-
class UnsupportedOperation(OSError, ValueError): ...
23-
else:
24-
class BlockingIOError(IOError):
25-
characters_written = ... # type: int
26-
class UnsupportedOperation(IOError, ValueError): ...
20+
# FIXME when mypy handle condtional, we can uncomment the next block and remove
21+
# the temporary fix
22+
#if sys.version_info >= (3, 3):
23+
# BlockingIOError = BlockingIOError
24+
# class UnsupportedOperation(OSError, ValueError): ...
25+
#else:
26+
# class BlockingIOError(IOError):
27+
# characters_written = ... # type: int
28+
# class UnsupportedOperation(IOError, ValueError): ...
29+
class BlockingIOError(OSError):
30+
characters_written = ... # type: int
31+
class UnsupportedOperation(OSError, ValueError): ...
32+
2733

2834
class IOBase:
2935
def __iter__(self) -> Iterator[bytes]: ...

0 commit comments

Comments
 (0)