summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-06-25 22:51:05 (GMT)
committerGitHub <noreply@github.com>2019-06-25 22:51:05 (GMT)
commit22eb689cf3de7972a2789db3ad01a86949508ab7 (patch)
treea1d63fa4cf235008e73f92a18ebef57be54ce4a5 /Doc/whatsnew
parente1a63c4f21011a3ae77dff624196561070c83446 (diff)
downloadcpython-22eb689cf3de7972a2789db3ad01a86949508ab7.zip
cpython-22eb689cf3de7972a2789db3ad01a86949508ab7.tar.gz
cpython-22eb689cf3de7972a2789db3ad01a86949508ab7.tar.bz2
bpo-37388: Development mode check encoding and errors (GH-14341)
In development mode and in debug build, encoding and errors arguments are now checked on string encoding and decoding operations. Examples: open(), str.encode() and bytes.decode(). By default, for best performances, the errors argument is only checked at the first encoding/decoding error, and the encoding argument is sometimes ignored for empty strings.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.9.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst
index b58c99b..e9a31c8 100644
--- a/Doc/whatsnew/3.9.rst
+++ b/Doc/whatsnew/3.9.rst
@@ -84,6 +84,15 @@ Other Language Changes
this case.
(Contributed by Victor Stinner in :issue:`20443`.)
+* In development mode and in debug build, *encoding* and *errors* arguments are
+ now checked on string encoding and decoding operations. Examples:
+ :func:`open`, :meth:`str.encode` and :meth:`bytes.decode`.
+
+ By default, for best performances, the *errors* argument is only checked at
+ the first encoding/decoding error, and the *encoding* argument is sometimes
+ ignored for empty strings.
+ (Contributed by Victor Stinner in :issue:`37388`.)
+
New Modules
===========