Skip to content

gh-132952: Improve Python startup time by ~12% #132956

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
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