From 35715d1e72b7e15e337087863c75af447199e0fb Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Sun, 4 Apr 2021 09:01:23 +0900 Subject: bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25145) * test_asyncio * test_bz2 * test_math * test_cmath * test_cmd_line * test_cmd_line_script * test_compile * test_contextlib * test_profile * ctypes/test/test_find * test_multiprocessing * test_configparser * test_csv * test_dbm_dumb * test_decimal * test_difflib * os.fdopen() calls io.text_encoding() to emit EncodingWarning for right place. --- Lib/test/multibytecodec_support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/test/multibytecodec_support.py') diff --git a/Lib/test/multibytecodec_support.py b/Lib/test/multibytecodec_support.py index f76c0153f5e..dbf0cc428e3 100644 --- a/Lib/test/multibytecodec_support.py +++ b/Lib/test/multibytecodec_support.py @@ -296,7 +296,7 @@ class TestBase_Mapping(unittest.TestCase): self.skipTest("Could not retrieve "+self.mapfileurl) def open_mapping_file(self): - return support.open_urlresource(self.mapfileurl) + return support.open_urlresource(self.mapfileurl, encoding="utf-8") def test_mapping_file(self): if self.mapfileurl.endswith('.xml'): -- cgit v1.2.3