From 7a4498ead9f7fa0da7c80caded24f41aa7a81698 Mon Sep 17 00:00:00 2001 From: Oleg Iarygin Date: Fri, 24 Jun 2022 19:41:13 +0300 Subject: [PATCH 1/2] Remove `python -m codecs` --- Lib/codecs.py | 10 ---------- .../2022-06-24-19-40-40.gh-issue-93096.3RlK2d.rst | 2 ++ 2 files changed, 2 insertions(+), 10 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2022-06-24-19-40-40.gh-issue-93096.3RlK2d.rst diff --git a/Lib/codecs.py b/Lib/codecs.py index e6ad6e3a052364..5a1e7ec804009c 100644 --- a/Lib/codecs.py +++ b/Lib/codecs.py @@ -1114,13 +1114,3 @@ def make_encoding_map(decoding_map): _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 index 00000000000000..3b7f896b5798d5 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2022-06-24-19-40-40.gh-issue-93096.3RlK2d.rst @@ -0,0 +1,2 @@ +Removed the undocumented ``python -m codecs``. Use ``python -m unittest +test.test_codecs.EncodedFileTest`` instead. From f339c739594a5e65a3e6ba6384192a97cb109b79 Mon Sep 17 00:00:00 2001 From: Oleg Iarygin Date: Fri, 24 Jun 2022 19:46:08 +0300 Subject: [PATCH 2/2] Fix grammar --- .../next/Library/2022-06-24-19-40-40.gh-issue-93096.3RlK2d.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index 3b7f896b5798d5..f7d9e33eb414db 100644 --- 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 @@ -1,2 +1,2 @@ -Removed the undocumented ``python -m codecs``. Use ``python -m unittest +Removed undocumented ``python -m codecs``. Use ``python -m unittest test.test_codecs.EncodedFileTest`` instead.