]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-93096: Remove `python -m codecs` (gh-94233)
authorOleg Iarygin <oleg@arhadthedev.net>
Sat, 2 Jul 2022 05:45:31 +0000 (08:45 +0300)
committerGitHub <noreply@github.com>
Sat, 2 Jul 2022 05:45:31 +0000 (14:45 +0900)
Lib/codecs.py
Misc/NEWS.d/next/Library/2022-06-24-19-40-40.gh-issue-93096.3RlK2d.rst [new file with mode: 0644]

index e6ad6e3a0523643fab643798d818e5e4927217d6..5a1e7ec804009c5738a4e03de3dfc7ceef40bfc7 100644 (file)
@@ -1114,13 +1114,3 @@ except LookupError:
 _false = 0
 if _false:
     import encodings
-
-### Tests
-
-if __name__ == '__main__':
-
-    # Make stdout translate Latin-1 output into UTF-8 output
-    sys.stdout = EncodedFile(sys.stdout, 'latin-1', 'utf-8')
-
-    # Have stdin translate Latin-1 input into UTF-8 input
-    sys.stdin = EncodedFile(sys.stdin, 'utf-8', 'latin-1')
diff --git a/Misc/NEWS.d/next/Library/2022-06-24-19-40-40.gh-issue-93096.3RlK2d.rst b/Misc/NEWS.d/next/Library/2022-06-24-19-40-40.gh-issue-93096.3RlK2d.rst
new file mode 100644 (file)
index 0000000..f7d9e33
--- /dev/null
@@ -0,0 +1,2 @@
+Removed undocumented ``python -m codecs``. Use ``python -m unittest
+test.test_codecs.EncodedFileTest`` instead.