Skip to content

Commit 1dc1c91

Browse files
authored
io.IOBase: correct metaclass (#8468)
`io.IOBase` has `ABCMeta` as the metaclass at runtime: https://github.com/python/cpython/blob/75a6441718dcbc65d993c9544e67e25bef120e82/Lib/io.py#L71 But not currently in the stub. This is causing an unexpected stubtest failure for a `urllib3` PR here: https://github.com/python/typeshed/runs/7633083101?check_suite_focus=true
1 parent df4618e commit 1dc1c91

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stdlib/io.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import abc
12
import builtins
23
import codecs
34
import sys
@@ -47,7 +48,7 @@ BlockingIOError = builtins.BlockingIOError
4748

4849
class UnsupportedOperation(OSError, ValueError): ...
4950

50-
class IOBase:
51+
class IOBase(metaclass=abc.ABCMeta):
5152
def __iter__(self) -> Iterator[bytes]: ...
5253
def __next__(self) -> bytes: ...
5354
def __enter__(self: Self) -> Self: ...

0 commit comments

Comments
 (0)