gh-62184: Remove _pyio import of _io.FileIO#134192
Merged
ambv merged 2 commits intopython:mainfrom May 21, 2025
Merged
Conversation
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.
AA-Turner
approved these changes
May 19, 2025
Member
AA-Turner
left a comment
There was a problem hiding this comment.
Can you add a test (maybe using the new helper) that _io isn't imported when importing _pyio?
A
Contributor
Author
|
|
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
May 21, 2025
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. (cherry picked from commit 0a68068) Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
May 21, 2025
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. (cherry picked from commit 0a68068) Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
|
GH-134436 is a backport of this pull request to the 3.13 branch. |
|
GH-134437 is a backport of this pull request to the 3.14 branch. |
lkollar
pushed a commit
to lkollar/cpython
that referenced
this pull request
May 26, 2025
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.
Pranjal095
pushed a commit
to Pranjal095/cpython
that referenced
this pull request
Jul 12, 2025
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.
taegyunkim
pushed a commit
to taegyunkim/cpython
that referenced
this pull request
Aug 4, 2025
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was added in the add of
_io, isn't used since bpo-21859 added a Python-native_pyioimplementation ofFileIOfurther down in the file.(Happy to add a news, but also don't think there is particularly a user visible change?)
This is the last direct import of
_ioin_pyio._iois still imported indirectly (by way ofio) for io.open_code, io.UnsupportedOperation, and registering_pyiobase abstract classes to the generalioones forisinstance, and several constants (ex. SEEK_SET, ...).