diff --git a/Lib/io.py b/Lib/io.py index e9fe619392e3d9..fadc19c09be424 100644 --- a/Lib/io.py +++ b/Lib/io.py @@ -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, @@ -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 @@ -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 pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy