Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Lib/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
import _io
import abc

from _collections_abc import _check_methods
from _io import (DEFAULT_BUFFER_SIZE, BlockingIOError, UnsupportedOperation,
open, open_code, FileIO, BytesIO, StringIO, BufferedReader,
BufferedWriter, BufferedRWPair, BufferedRandom,
Expand Down Expand Up @@ -126,6 +125,7 @@ def read(self, size=..., /):
@classmethod
def __subclasshook__(cls, C):
if cls is Reader:
from _collections_abc import _check_methods
return _check_methods(C, "read")
return NotImplemented

Expand All @@ -147,6 +147,7 @@ def write(self, data, /):
@classmethod
def __subclasshook__(cls, C):
if cls is Writer:
from _collections_abc import _check_methods
return _check_methods(C, "write")
return NotImplemented

Expand Down
Loading