Skip to content

bpo-43680: Remove undocumented io.OpenWrapper #25114

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

bpo-43680: Remove undocumented io.OpenWrapper #25114

wants to merge 1 commit into from

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Mar 31, 2021

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

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.
@@ -1133,6 +1133,11 @@ Removed
(Contributed by Yurii Karabas, Andrew Svetlov, Yury Selivanov and Kyle Stanley
in :issue:`42392`.)

* Remove the undocumented ``io.OpenWrapper`` and ``_pyio.OpenWrapper``
Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

_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.

Copy link

@ronaldinzkie ronaldinzkie left a comment

Choose a reason for hiding this comment

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

Doc/whatsnew/3.10.rst

@vstinner
Copy link
Member Author

I wrote PR #25357 to only deprecate the class, rather than removing it.

@vstinner vstinner closed this Apr 13, 2021
@vstinner vstinner deleted the remove_open_wrapper branch April 13, 2021 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants