summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d
diff options
context:
space:
mode:
authorJesse-Bakker <jessebakker00@gmail.com>2017-11-29 23:05:07 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2017-11-29 23:05:07 (GMT)
commit706e10b186992e086e661a62d2c8ec9588525b31 (patch)
tree6ef28e2e18a1183757d3a31236c2b5e8b4434254 /Misc/NEWS.d
parent859f7ce7a49f8bd6309748c05e460c10f6a433ed (diff)
downloadcpython-706e10b186992e086e661a62d2c8ec9588525b31.zip
cpython-706e10b186992e086e661a62d2c8ec9588525b31.tar.gz
cpython-706e10b186992e086e661a62d2c8ec9588525b31.tar.bz2
bpo-32121: Add most_recent_first parameter to tracemalloc.Traceback.format (#4534)
* Add most_recent_first parameter to tracemalloc.Traceback.format to allow reversing the order of the frames in the output * Reversed default sorting of tracemalloc.Traceback frames * Allowed negative limit, truncating from the other side.
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r--Misc/NEWS.d/next/Library/2017-11-24-00-59-12.bpo-32121.ePbmwC.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2017-11-24-00-59-12.bpo-32121.ePbmwC.rst b/Misc/NEWS.d/next/Library/2017-11-24-00-59-12.bpo-32121.ePbmwC.rst
new file mode 100644
index 0000000..7701c86
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2017-11-24-00-59-12.bpo-32121.ePbmwC.rst
@@ -0,0 +1,6 @@
+Made ``tracemalloc.Traceback`` behave more like the traceback module,
+sorting the frames from oldest to most recent. ``Traceback.format()``
+now accepts negative *limit*, truncating the result to the ``abs(limit)``
+oldest frames. To get the old behaviour, one can use the new
+*most_recent_first* argument to ``Traceback.format()``.
+(Patch by Jesse Bakker.)