Message234043
I propose to add destructors to transports and event loops which emit a ResourceWarning if they are not closed.
The change should help to detect resource leaks and bugs.
Attached patch implements this issue. It only adds destructors on Python 3.4 and later, because older Python versions don't implement the PEP 442 (Safe object finalization) and so objects part of reference cycle would never be deleted.
The patch adds a new _closed attribute to BaseSubprocessTransport and _SSLProtocolTransport classes, to track if the transport was closed or not.
The patch should help to find bugs like this one:
https://code.google.com/p/tulip/issues/detail?id=218 |
|
Date |
User |
Action |
Args |
2015-01-14 23:18:04 | vstinner | set | recipients:
+ vstinner, gvanrossum, yselivanov |
2015-01-14 23:18:04 | vstinner | set | messageid: <1421277484.12.0.751563251482.issue23243@psf.upfronthosting.co.za> |
2015-01-14 23:18:04 | vstinner | link | issue23243 messages |
2015-01-14 23:18:03 | vstinner | create | |
|