[New-bugs-announce] [issue26590] socket destructor: implement finalizer
report at bugs.python.org
Fri Mar 18 21:31:15 EDT 2016
New submission from STINNER Victor:
The PEP 442 helped to make object finalization safer, but it's just an API, it's not widely used in the Python core yet. io.FileIO has a nice implementation, but socket.socket and os.scandir don't.
I noticed this while working on the issue #26567 which indirectly resurected a destroyed socket (in test_socket).
As I workaround, I reverted my change on socket destructor, but I'm interested to enhance socket destructor to be able to use the new tracemalloc feature of the warnings module.
nosy: haypo, pitrou
title: socket destructor: implement finalizer
versions: Python 3.6
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce