This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients christian.heimes, gvanrossum, methane, serhiy.storchaka, vstinner
Date 2021-03-31.14:57:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1617202626.86.0.983635586522.issue43680@roundup.psfhosted.org>
In-reply-to
Content
> 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 an alias to io.open.

$ python3
Python 3.9.2 (default, Feb 20 2021, 00:00:00) 
>>> import io
>>> io.OpenWrapper is io.open
True


> (I suppose that at thet moment dumbdbm.py still set open as a class attribute).

I failed to find where in Lib/dbm/dumb.py the open() function is used to define a method. Maybe the code changed since OpenWrapper was added?

At commit ce3a72aec6eaa0293c397c8d0407f7afe0072b2f, the io module was only implemented in Python (Lib/io.py, _io exist didn't exist). It was reimplemented in C in Python 3.1.
History
Date User Action Args
2021-03-31 14:57:06vstinnersetrecipients: + vstinner, gvanrossum, christian.heimes, methane, serhiy.storchaka
2021-03-31 14:57:06vstinnersetmessageid: <1617202626.86.0.983635586522.issue43680@roundup.psfhosted.org>
2021-03-31 14:57:06vstinnerlinkissue43680 messages
2021-03-31 14:57:06vstinnercreate