Author vstinner
Recipients David Ford (FirefighterBlu3), martin.panter, vstinner
Date 2017-02-15.10:37:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1487155072.59.0.45561151242.issue29564@psf.upfronthosting.co.za>
In-reply-to
Content
The report issue is not a bug. By design, Python cannot emits the ResourceWarning warning where you expect that it should be emitted. Martin explained you the thing with reference counter, reference cycles and the garbage collector.

It is exactly *why* I implemented the glue with tracemalloc to provide the traceback where the socket was allocated. I'm very happy to see that this feature (the traceback using tracemalloc) works as expected!

By the way, the warning module might log a message suggesting to enable tracemalloc to get the traceback if tracemalloc is available but disabled? What do you think?

The root issue is that the code doesn't close the SSLSocket: fix the code to close the socket, no?
History
Date User Action Args
2017-02-15 10:37:52vstinnersetrecipients: + vstinner, martin.panter, David Ford (FirefighterBlu3)
2017-02-15 10:37:52vstinnersetmessageid: <1487155072.59.0.45561151242.issue29564@psf.upfronthosting.co.za>
2017-02-15 10:37:52vstinnerlinkissue29564 messages
2017-02-15 10:37:52vstinnercreate