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 <rep...@bugs.python.org>
<http://bugs.python.org/issue26590>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to