Skip to content

Commit 8bc1818

Browse files
authored
gh-127691: add type checks when using PyUnicodeError objects (GH-127694)
1 parent 6446408 commit 8bc1818

File tree

3 files changed

+157
-68
lines changed

3 files changed

+157
-68
lines changed

Doc/whatsnew/3.14.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,6 +1045,12 @@ New features
10451045
* Add :c:func:`PyUnstable_Object_EnableDeferredRefcount` for enabling
10461046
deferred reference counting, as outlined in :pep:`703`.
10471047

1048+
* The :ref:`Unicode Exception Objects <unicodeexceptions>` C API
1049+
now raises a :exc:`TypeError` if its exception argument is not
1050+
a :exc:`UnicodeError` object.
1051+
(Contributed by Bénédikt Tran in :gh:`127691`.)
1052+
1053+
10481054
Porting to Python 3.14
10491055
----------------------
10501056

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
The :ref:`Unicode Exception Objects <unicodeexceptions>` C API
2+
now raises a :exc:`TypeError` if its exception argument is not
3+
a :exc:`UnicodeError` object. Patch by Bénédikt Tran.

0 commit comments

Comments
 (0)