This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients David Ford (FirefighterBlu3), martin.panter
Date 2017-02-15.07:40:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1487144456.56.0.445025665024.issue29564@psf.upfronthosting.co.za>
In-reply-to
Content
Without more information about what the relevant code is and why you think the line number is wrong, my best guess is you may not realize how the ResourceWarning is emitted. It happens when the garbage collector runs and destroys the socket object, which happens sometime after the last reference to the socket has been deleted. So the line number can be rather arbitrary, especially if it was a reference cycle that triggered the garbage collector.

If you are having trouble tracking down what socket is involved, the new “python -X tracemalloc=<N>” option <https://docs.python.org/3/whatsnew/3.6.html#warnings> may help. It saves stack traces when objects are created.
History
Date User Action Args
2017-02-15 07:40:56martin.pantersetrecipients: + martin.panter, David Ford (FirefighterBlu3)
2017-02-15 07:40:56martin.pantersetmessageid: <1487144456.56.0.445025665024.issue29564@psf.upfronthosting.co.za>
2017-02-15 07:40:56martin.panterlinkissue29564 messages
2017-02-15 07:40:55martin.pantercreate