Skip to content

Commit

Permalink
gh-127691: add type checks when using PyUnicodeError objects (GH-12…
Browse files Browse the repository at this point in the history
  • Loading branch information
picnixz authored Dec 13, 2024
1 parent 6446408 commit 8bc1818
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 68 deletions.
6 changes: 6 additions & 0 deletions Doc/whatsnew/3.14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,12 @@ New features
* Add :c:func:`PyUnstable_Object_EnableDeferredRefcount` for enabling
deferred reference counting, as outlined in :pep:`703`.

* The :ref:`Unicode Exception Objects <unicodeexceptions>` C API
now raises a :exc:`TypeError` if its exception argument is not
a :exc:`UnicodeError` object.
(Contributed by Bénédikt Tran in :gh:`127691`.)


Porting to Python 3.14
----------------------

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The :ref:`Unicode Exception Objects <unicodeexceptions>` C API
now raises a :exc:`TypeError` if its exception argument is not
a :exc:`UnicodeError` object. Patch by Bénédikt Tran.
Loading

0 comments on commit 8bc1818

Please sign in to comment.