]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-37751: Document codecs.lookup() change in What's New in Python 3.9 (GH-23096...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 27 Apr 2021 14:25:19 +0000 (07:25 -0700)
committerGitHub <noreply@github.com>
Tue, 27 Apr 2021 14:25:19 +0000 (16:25 +0200)
(cherry picked from commit 32980fb669a6857276da18895fcc0cb6f6fbb544)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
Co-authored-by: Hai Shi <shihai1992@gmail.com>
Doc/whatsnew/3.9.rst

index b39fdb5efdf51a170b7f3f5f292cd44810bbf03c..6ef0d2a5eff36154f8676834869b040dede745bd 100644 (file)
@@ -1114,6 +1114,12 @@ Changes in the Python API
   compatible classes that don't inherit from those mentioned types.
   (Contributed by Roger Aiudi in :issue:`34775`).
 
+* :func:`codecs.lookup` now normalizes the encoding name the same way as
+  :func:`encodings.normalize_encoding`, except that :func:`codecs.lookup` also
+  converts the name to lower case. For example, ``"latex+latin1"`` encoding
+  name is now normalized to ``"latex_latin1"``.
+  (Contributed by Jordon Xu in :issue:`37751`.)
+
 
 Changes in the C API
 --------------------