]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
On ResourceWarning, log traceback where the object was allocated
authorVictor Stinner <victor.stinner@gmail.com>
Sat, 19 Mar 2016 00:03:51 +0000 (01:03 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Sat, 19 Mar 2016 00:03:51 +0000 (01:03 +0100)
commit914cde89d4c94b0b9206d0fa22322a1142833a56
tree7eed294f0da18437f719df470dbee278cfb40787
parent1231a4615fd447f0988a72a134a1fc5e7d4e8d69
On ResourceWarning, log traceback where the object was allocated

Issue #26567:

* Add a new function PyErr_ResourceWarning() function to pass the destroyed
  object
* Add a source attribute to warnings.WarningMessage
* Add warnings._showwarnmsg() which uses tracemalloc to get the traceback where
  source object was allocated.
Doc/c-api/exceptions.rst
Doc/library/warnings.rst
Doc/whatsnew/3.6.rst
Include/warnings.h
Lib/test/test_warnings/__init__.py
Lib/warnings.py
Misc/NEWS
Modules/_io/fileio.c
Modules/posixmodule.c
Modules/socketmodule.c
Python/_warnings.c