From d0e31c1e370ade01b0044074f4158a8bde9d4602 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Fri, 11 Jul 2025 08:15:39 +0100 Subject: [PATCH] Alias --- Doc/library/codecs.rst | 2 +- Lib/encodings/aliases.py | 5 ++++- .../Library/2025-07-11-08-15-17.gh-issue-83336.ptpmq7.rst | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2025-07-11-08-15-17.gh-issue-83336.ptpmq7.rst diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst index 0e84f18dd4d5d5..2f8924705c2336 100644 --- a/Doc/library/codecs.rst +++ b/Doc/library/codecs.rst @@ -1325,7 +1325,7 @@ particular, the following variants typically exist: +-----------------+--------------------------------+--------------------------------+ | utf_8 | U8, UTF, utf8, cp65001 | all languages | +-----------------+--------------------------------+--------------------------------+ -| utf_8_sig | | all languages | +| utf_8_sig | utf8-sig | all languages | +-----------------+--------------------------------+--------------------------------+ .. versionchanged:: 3.4 diff --git a/Lib/encodings/aliases.py b/Lib/encodings/aliases.py index 4ecb6b6e297a13..912dc7c2138f91 100644 --- a/Lib/encodings/aliases.py +++ b/Lib/encodings/aliases.py @@ -17,7 +17,7 @@ """ aliases = { - # Please keep this list sorted alphabetically by value ! + # Please keep this list sorted alphabetically by value! # ascii codec '646' : 'ascii', @@ -545,6 +545,9 @@ 'utf8_ucs4' : 'utf_8', 'cp65001' : 'utf_8', + # utf_8_sig codec + 'utf8_sig' : 'utf_8_sig', + # uu_codec codec 'uu' : 'uu_codec', diff --git a/Misc/NEWS.d/next/Library/2025-07-11-08-15-17.gh-issue-83336.ptpmq7.rst b/Misc/NEWS.d/next/Library/2025-07-11-08-15-17.gh-issue-83336.ptpmq7.rst new file mode 100644 index 00000000000000..022ff664ed94df --- /dev/null +++ b/Misc/NEWS.d/next/Library/2025-07-11-08-15-17.gh-issue-83336.ptpmq7.rst @@ -0,0 +1 @@ +``utf8_sig`` is now aliased to :mod:`encodings.utf_8_sig`