Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-62184: Remove _pyio import of _io.FileIO#134192

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ambv merged 2 commits intopython:mainfromcmaloney:pyio_fileio
May 21, 2025

Conversation

cmaloney
Copy link
Contributor

@cmaloneycmaloney commentedMay 18, 2025
edited
Loading

This was added in the add of_io, isn't used sincebpo-21859 added a Python-native_pyio implementation ofFileIO further 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_io in_pyio._io is still imported indirectly (by way ofio) for io.open_code, io.UnsupportedOperation, and registering_pyio base abstract classes to the generalio ones forisinstance, and several constants (ex. SEEK_SET, ...).

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 inthe file.
Copy link
Member

@AA-TurnerAA-Turner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Can you add a test (maybe using the new helper) that_io isn't imported when importing_pyio?

A

@cmaloney
Copy link
ContributorAuthor

cmaloney commentedMay 19, 2025
edited
Loading

_io is still imported indirectly (by way ofio), so a test with new helper would fail currently I think? Can work on that, but I think splittingio.py into two parts (1. common base for_pyio and_io 2. forward/dispatch to_io) likely isn't worth the performance impact at the moment (see also changing from importingio to_io to increase performance ingh-132952).

@ambvambv merged commit0a68068 intopython:mainMay 21, 2025
43 checks passed
@ambvambv added needs backport to 3.13bugs and security fixes needs backport to 3.14bugs and security fixes labelsMay 21, 2025
@miss-islington-app
Copy link

Thanks@cmaloney for the PR, and@ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Thanks@cmaloney for the PR, and@ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 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 inthe file.(cherry picked from commit0a68068)Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 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 inthe file.(cherry picked from commit0a68068)Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
@bedevere-app
Copy link

GH-134436 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelMay 21, 2025
@bedevere-app
Copy link

GH-134437 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelMay 21, 2025
ambv pushed a commit that referenced this pull requestMay 21, 2025
…4436)This was added in the add of `_io`, isn't used sincebpo-21859 when a`_pyio` implementation was added which defines `FileIO` lower down inthe file.(cherry picked from commit0a68068)Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
@cmaloneycmaloney deleted the pyio_fileio branchMay 21, 2025 15:57
ambv pushed a commit that referenced this pull requestMay 21, 2025
…4437)This was added in the add of `_io`, isn't used sincebpo-21859 when a`_pyio` implementation was added which defines `FileIO` lower down inthe file.(cherry picked from commit0a68068)Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@AA-TurnerAA-TurnerAA-Turner approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@cmaloney@AA-Turner@ambv

[8]ページ先頭

©2009-2025 Movatter.jp