[New-bugs-announce] [issue26590] socket destructor: implement finalizer

STINNER Victor 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.

----------
messages: 262014
nosy: haypo, pitrou
priority: normal
severity: normal
status: open
title: socket destructor: implement finalizer
type: enhancement
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26590>
_______________________________________


More information about the New-bugs-announce mailing list