[issue43680] Remove undocumented io.OpenWrapper and _pyio.OpenWrapper

2021-04-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 3bc694d5f3d4eb2e5d2f0b83e498b19662845d4e by Victor Stinner in branch 'master': bpo-43680: Deprecate io.OpenWrapper (GH-25357) https://github.com/python/cpython/commit/3bc694d5f3d4eb2e5d2f0b83e498b19662845d4e -- ___

[issue43680] Remove undocumented io.OpenWrapper and _pyio.OpenWrapper

2021-04-13 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +24128 pull_request: https://github.com/python/cpython/pull/25395 ___ Python tracker ___ _

[issue43680] Remove undocumented io.OpenWrapper and _pyio.OpenWrapper

2021-04-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +24091 pull_request: https://github.com/python/cpython/pull/25357 ___ Python tracker ___ __

[issue43680] Remove undocumented io.OpenWrapper and _pyio.OpenWrapper

2021-04-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset 77d668b1221d0f8c3e9d6b6199f67aaf3c45f040 by Victor Stinner in branch 'master': bpo-43680: _pyio.open() becomes a static method (GH-25354) https://github.com/python/cpython/commit/77d668b1221d0f8c3e9d6b6199f67aaf3c45f040 -- ___

[issue43680] Remove undocumented io.OpenWrapper and _pyio.OpenWrapper

2021-04-12 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +24089 pull_request: https://github.com/python/cpython/pull/25354 ___ Python tracker ___ __

[issue43680] Remove undocumented io.OpenWrapper and _pyio.OpenWrapper

2021-03-31 Thread STINNER Victor
STINNER Victor added the comment: > It is still can be set as a class attribute in user code, so I think that > removing OpenWrapper needs a deprecated period. I'm fine with deprecating the function by defining a __getattr__() function in io.py and _pyio.py. But only if it doesn't block the

[issue43680] Remove undocumented io.OpenWrapper and _pyio.OpenWrapper

2021-03-31 Thread STINNER Victor
STINNER Victor added the comment: > OpenWrapper was added in ce3a72aec6eaa0293c397c8d0407f7afe0072b2f (issue1267) > and was only used to set __builtin__.open It is useless in CPython, since CPython always use the C implementation of the io module, and in the io module, io.OpenWrapper is just

[issue43680] Remove undocumented io.OpenWrapper and _pyio.OpenWrapper

2021-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: OpenWrapper was added in ce3a72aec6eaa0293c397c8d0407f7afe0072b2f (issue1267) and was only used to set __builtin__.open (I suppose that at thet moment dumbdbm.py still set open as a class attribute). It is still can be set as a class attribute in user code

[issue43680] Remove undocumented io.OpenWrapper and _pyio.OpenWrapper

2021-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As for dbm.dumb, it was an attempt to make _Database._commit() working at the shutdown stage (it is indirectly called from __del__()). See issue723231. Although in Python 2 __builtin__.open != io.open, and in Python 3.0 the code already uses io.open direct

[issue43680] Remove undocumented io.OpenWrapper and _pyio.OpenWrapper

2021-03-31 Thread STINNER Victor
STINNER Victor added the comment: I also opened a discussion on python-dev about OpenWrapper and staticmethod: https://mail.python.org/archives/list/python-...@python.org/thread/QZ7SFW3IW3S2C5RMRJZOOUFSHHUINNME/ -- ___ Python tracker

[issue43680] Remove undocumented io.OpenWrapper and _pyio.OpenWrapper

2021-03-31 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +methane ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue43680] Remove undocumented io.OpenWrapper and _pyio.OpenWrapper

2021-03-31 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +23858 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25114 ___ Python tracker ___ _

[issue43680] Remove undocumented io.OpenWrapper and _pyio.OpenWrapper

2021-03-31 Thread STINNER Victor
New submission from STINNER Victor : The OpenWrapper function of io and _pyio is an undocumented hack allowing to use the builtin open() function as a method: class MyClass: method = open MyClass.method(...)# class method MyClass().method(...) # instance method It is only needed by