mirror of
https://github.com/python/cpython.git
synced 2025-11-24 20:30:18 +00:00
[3.14] gh-135069: Fix exception message in encodings.idna module (GH-135071) (#136235)
gh-135069: Fix exception message in encodings.idna module (GH-135071)
(cherry picked from commit 8dc3383abe)
Co-authored-by: Daniel Hollas <daniel.hollas@bristol.ac.uk>
This commit is contained in:
parent
84cafc7e94
commit
4bc9c018d1
2 changed files with 4 additions and 1 deletions
|
|
@ -316,7 +316,7 @@ class IncrementalEncoder(codecs.BufferedIncrementalEncoder):
|
|||
class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
|
||||
def _buffer_decode(self, input, errors, final):
|
||||
if errors != 'strict':
|
||||
raise UnicodeError("Unsupported error handling: {errors}")
|
||||
raise UnicodeError(f"Unsupported error handling: {errors}")
|
||||
|
||||
if not input:
|
||||
return ("", 0)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
Fix the "Invalid error handling" exception in
|
||||
:class:`!encodings.idna.IncrementalDecoder` to correctly replace the
|
||||
'errors' parameter.
|
||||
Loading…
Add table
Add a link
Reference in a new issue