]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-83336: Add alias for consistency to `utf-8-sig` (#136530)
authorStan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Wed, 24 Sep 2025 08:38:57 +0000 (09:38 +0100)
committerGitHub <noreply@github.com>
Wed, 24 Sep 2025 08:38:57 +0000 (10:38 +0200)
Closes #83336

Doc/library/codecs.rst
Lib/encodings/aliases.py
Misc/NEWS.d/next/Library/2025-07-11-08-15-17.gh-issue-83336.ptpmq7.rst [new file with mode: 0644]

index 90a695ef937f75b6c3f8ea2b29f229371fc19c7e..8c5c87a7ef16e491d83e884711f5e76d5d50c220 100644 (file)
@@ -1339,7 +1339,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
index 474d74ea3dc1912279f3d208a6f2e4b8103691ec..f4b1b8dd43f920540e4b9a9271ac07759179ce1e 100644 (file)
@@ -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',
@@ -554,6 +554,9 @@ aliases = {
     '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 (file)
index 0000000..022ff66
--- /dev/null
@@ -0,0 +1 @@
+``utf8_sig`` is now aliased to :mod:`encodings.utf_8_sig`