Skip to content

Commit 56185a9

Browse files
committed
add news
1 parent 75e1496 commit 56185a9

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Doc/whatsnew/3.12.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,12 @@ sys
397397
with contributions from Gregory P. Smith [Google] and Mark Shannon
398398
in :gh:`96123`.)
399399

400+
* Add ``sys.last_exc`` which holds the last unhandled exception that
401+
was raised (for post-mortem debugging use cases). Deprecate the
402+
three fields that have the same information in its legacy form:
403+
``sys.last_type``, ``sys.last_value`` and ``sys.last_traceback``.
404+
(Contributed by Irit Katriel in :gh:`102778`.)
405+
400406

401407
Optimizations
402408
=============
@@ -488,6 +494,9 @@ Deprecated
488494
contain the creation time, which is also available in the new ``st_birthtime``
489495
field. (Contributed by Steve Dower in :gh:`99726`.)
490496

497+
* The ``sys.last_type``, ``sys.last_value`` and ``sys.last_traceback`` fields.
498+
Use ``sys.last_exc`` instead. (Contributed by Irit Katriel in :gh:`102778`.)
499+
491500
Pending Removal in Python 3.13
492501
------------------------------
493502

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Add ``sys.last_exc`` and deprecate ``sys.last_type``, ``sys.last_value`` and
2+
``sys.last_traceback``, which have the same info in its legacy form.

0 commit comments

Comments
 (0)