From 9f26a4f3aa2c90b701c5f15b40fbc7cdf44deccb Mon Sep 17 00:00:00 2001 From: Cody Maloney Date: Sun, 18 May 2025 12:43:47 -0400 Subject: [PATCH 1/2] gh-62184: Remove _pyio import of _io.FileIO This was added in the add of `_io`, isn't used since bpo-21859 when a `_pyio` implementation was added which defines `FileIO` lower down in the file. --- Lib/_pyio.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/Lib/_pyio.py b/Lib/_pyio.py index a870de5b532542..8105de1e9459b6 100644 --- a/Lib/_pyio.py +++ b/Lib/_pyio.py @@ -645,8 +645,6 @@ def write(self, b): self._unsupported("write") io.RawIOBase.register(RawIOBase) -from _io import FileIO -RawIOBase.register(FileIO) class BufferedIOBase(IOBase): From 556f5a8af3ebfa9ba9bde019feb66d8026e03401 Mon Sep 17 00:00:00 2001 From: Cody Maloney Date: Sun, 18 May 2025 15:17:30 -0400 Subject: [PATCH 2/2] add blurb --- .../next/Library/2025-05-18-12-48-39.gh-issue-62184.y11l10.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2025-05-18-12-48-39.gh-issue-62184.y11l10.rst diff --git a/Misc/NEWS.d/next/Library/2025-05-18-12-48-39.gh-issue-62184.y11l10.rst b/Misc/NEWS.d/next/Library/2025-05-18-12-48-39.gh-issue-62184.y11l10.rst new file mode 100644 index 00000000000000..7bc994e57fb58f --- /dev/null +++ b/Misc/NEWS.d/next/Library/2025-05-18-12-48-39.gh-issue-62184.y11l10.rst @@ -0,0 +1,2 @@ +Remove import of C implementation of :class:`io.FileIO` from Python +implementation which has its own implementation