Debian Codegraph @

testing/web-platform/tests/tools/third_party/exceptiongroup/CHANGES.rst

raw
1 Version history
2 ===============
3
4 This library adheres to `Semantic Versioning 2.0 <http://semver.org/>`_.
5
6 **1.2.1**
7
8 - Updated the copying of ``__notes__`` to match CPython behavior (PR by CF Bolz-Tereick)
9 - Corrected the type annotation of the exception handler callback to accept a
10 ``BaseExceptionGroup`` instead of ``BaseException``
11 - Fixed type errors on Python < 3.10 and the type annotation of ``suppress()``
12 (PR by John Litborn)
13
14 **1.2.0**
15
16 - Added special monkeypatching if `Apport <https://github.com/canonical/apport>`_ has
17 overridden ``sys.excepthook`` so it will format exception groups correctly
18 (PR by John Litborn)
19 - Added a backport of ``contextlib.suppress()`` from Python 3.12.1 which also handles
20 suppressing exceptions inside exception groups
21 - Fixed bare ``raise`` in a handler reraising the original naked exception rather than
22 an exception group which is what is raised when you do a ``raise`` in an ``except*``
23 handler
24
25 **1.1.3**
26
27 - ``catch()`` now raises a ``TypeError`` if passed an async exception handler instead of
28 just giving a ``RuntimeWarning`` about the coroutine never being awaited. (#66, PR by
29 John Litborn)
30 - Fixed plain ``raise`` statement in an exception handler callback to work like a
31 ``raise`` in an ``except*`` block
32 - Fixed new exception group not being chained to the original exception when raising an
33 exception group from exceptions raised in handler callbacks
34 - Fixed type annotations of the ``derive()``, ``subgroup()`` and ``split()`` methods to
35 match the ones in typeshed
36
37 **1.1.2**
38
39 - Changed handling of exceptions in exception group handler callbacks to not wrap a
40 single exception in an exception group, as per
41 `CPython issue 103590 <https://github.com/python/cpython/issues/103590>`_
42
43 **1.1.1**
44
45 - Worked around
46 `CPython issue #98778 <https://github.com/python/cpython/issues/98778>`_,
47 ``urllib.error.HTTPError(..., fp=None)`` raises ``KeyError`` on unknown attribute
48 access, on affected Python versions. (PR by Zac Hatfield-Dodds)
49
50 **1.1.0**
51
52 - Backported upstream fix for gh-99553 (custom subclasses of ``BaseExceptionGroup`` that
53 also inherit from ``Exception`` should not be able to wrap base exceptions)
54 - Moved all initialization code to ``__new__()`` (thus matching Python 3.11 behavior)
55
56 **1.0.4**
57
58 - Fixed regression introduced in v1.0.3 where the code computing the suggestions would
59 assume that both the ``obj`` attribute of ``AttributeError`` is always available, even
60 though this is only true from Python 3.10 onwards
61 (#43; PR by Carl Friedrich Bolz-Tereick)
62
63 **1.0.3**
64
65 - Fixed monkey patching breaking suggestions (on a ``NameError`` or ``AttributeError``)
66 on Python 3.10 (#41; PR by Carl Friedrich Bolz-Tereick)
67
68 **1.0.2**
69
70 - Updated type annotations to match the ones in ``typeshed``
71
72 **1.0.1**
73
74 - Fixed formatted traceback missing exceptions beyond 2 nesting levels of
75 ``__context__`` or ``__cause__``
76
77 **1.0.0**
78
79 - Fixed
80 ``AttributeError: 'PatchedTracebackException' object has no attribute '__cause__'``
81 on Python 3.10 (only) when a traceback is printed from an exception where an exception
82 group is set as the cause (#33)
83 - Fixed a loop in exception groups being rendered incorrectly (#35)
84 - Fixed the patched formatting functions (``format_exception()``etc.) not passing the
85 ``compact=True`` flag on Python 3.10 like the original functions do
86
87 **1.0.0rc9**
88
89 - Added custom versions of several ``traceback`` functions that work with exception
90 groups even if monkey patching was disabled or blocked
91
92 **1.0.0rc8**
93
94 - Don't monkey patch anything if ``sys.excepthook`` has been altered
95 - Fixed formatting of ``SyntaxError`` in the monkey patched
96 ``TracebackException.format_exception_only()`` method
97
98 **1.0.0rc7**
99
100 - **BACKWARDS INCOMPATIBLE** Changed ``catch()`` to not wrap an exception in an
101 exception group if only one exception arrived at ``catch()`` and it was not matched
102 with any handlers. This was to match the behavior of ``except*``.
103
104 **1.0.0rc6**
105
106 - **BACKWARDS INCOMPATIBLE** Changed ``catch()`` to match the behavior of ``except*``:
107 each handler will be called only once per key in the ``handlers`` dictionary, and with
108 an exception group as the argument. Handlers now also catch subclasses of the given
109 exception types, just like ``except*``.
110
111 **1.0.0rc5**
112
113 - Patch for ``traceback.TracebackException.format_exception_only()`` (PR by Zac Hatfield-Dodds)
114
115 **1.0.0rc4**
116
117 - Update `PEP 678`_ support to use ``.add_note()`` and ``__notes__`` (PR by Zac Hatfield-Dodds)
118
119 **1.0.0rc3**
120
121 - Added message about the number of sub-exceptions
122
123 **1.0.0rc2**
124
125 - Display and copy ``__note__`` (draft `PEP 678`_) if available (PR by Zac Hatfield-Dodds)
126
127 .. _PEP 678: https://www.python.org/dev/peps/pep-0678/
128
129 **1.0.0rc1**
130
131 - Initial release