bpo-43680: Remove undocumented io.OpenWrapper#25114
Closed
vstinner wants to merge 1 commit intopython:masterfrom
vstinner:remove_open_wrapper
Closed
bpo-43680: Remove undocumented io.OpenWrapper#25114vstinner wants to merge 1 commit intopython:masterfrom vstinner:remove_open_wrapper
vstinner wants to merge 1 commit intopython:masterfrom
vstinner:remove_open_wrapper
Conversation
Remove the undocumented io.OpenWrapper and _pyio.OpenWrapper functions which could be used directly to define a method: staticmethod(open) should now be used instead.
| (Contributed by Yurii Karabas, Andrew Svetlov, Yury Selivanov and Kyle Stanley | ||
| in :issue:`42392`.) | ||
|
|
||
| * Remove the undocumented ``io.OpenWrapper`` and ``_pyio.OpenWrapper`` |
Member
There was a problem hiding this comment.
OpenWrapper itself is not purposed to be used in user code. The main effect is that it changes builtin open if Python implementation is used. It can affect PyPy or other implementations.
Member
Author
There was a problem hiding this comment.
_pyio is supposed to be a drop-in replacement for the io module, whereas _pyio.open and io.open behave differently.
See https://bugs.python.org/issue43682 which would make it possible to use _pyio.open as a method, rather than having to go through OpenWrapper.
Member
Author
|
I wrote PR #25357 to only deprecate the class, rather than removing it. |
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.
Remove the undocumented io.OpenWrapper and _pyio.OpenWrapper
functions which could be used directly to define a method:
staticmethod(open) should now be used instead.
https://bugs.python.org/issue43680