Message287824
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. |
|
Date |
User |
Action |
Args |
2017-02-15 07:40:56 | martin.panter | set | recipients:
+ martin.panter, David Ford (FirefighterBlu3) |
2017-02-15 07:40:56 | martin.panter | set | messageid: <1487144456.56.0.445025665024.issue29564@psf.upfronthosting.co.za> |
2017-02-15 07:40:56 | martin.panter | link | issue29564 messages |
2017-02-15 07:40:55 | martin.panter | create | |
|