[Python-checkins] bpo-37751: Document codecs.lookup() change in What's New in Python 3.9 (GH-23096)

vstinner webhook-mailer at python.org
Fri Apr 23 05:10:51 EDT 2021


https://github.com/python/cpython/commit/32980fb669a6857276da18895fcc0cb6f6fbb544
commit: 32980fb669a6857276da18895fcc0cb6f6fbb544
branch: master
author: Hai Shi <shihai1992 at gmail.com>
committer: vstinner <vstinner at python.org>
date: 2021-04-23T11:10:43+02:00
summary:

bpo-37751: Document codecs.lookup() change in What's New in Python 3.9 (GH-23096)

files:
M Doc/whatsnew/3.9.rst

diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst
index 602ed065858ec..70809ff31c7f2 100644
--- a/Doc/whatsnew/3.9.rst
+++ b/Doc/whatsnew/3.9.rst
@@ -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
 --------------------



More information about the Python-checkins mailing list