bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25142)
* test__xxsubinterpreters
* test_builtin
* test_doctest
* test_exceptions
* test_opcodes
* test_support
* test_argparse
* test_baseexception
* test_bdb
* test_bool
* test_asdl_parser
diff --git a/Lib/test/test_bdb.py b/Lib/test/test_bdb.py
index 9bce780..71be069 100644
--- a/Lib/test/test_bdb.py
+++ b/Lib/test/test_bdb.py
@@ -539,7 +539,7 @@ def create_modules(modules):
try:
for m in modules:
fname = m + '.py'
- with open(fname, 'w') as f:
+ with open(fname, 'w', encoding="utf-8") as f:
f.write(textwrap.dedent(modules[m]))
linecache.checkcache(fname)
importlib.invalidate_caches()