Revert "[3.7] bpo-34589: Add -X coerce_c_locale option; C locale coercion off by default (GH-9379)" (GH-9416)
This reverts commit 144f1e2c6f4a24bd288c045986842c65cc289684.
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index 9155afc..27f7590 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -656,8 +656,9 @@
def c_locale_get_error_handler(self, locale, isolated=False, encoding=None):
# Force the POSIX locale
- env = dict(os.environ)
+ env = os.environ.copy()
env["LC_ALL"] = locale
+ env["PYTHONCOERCECLOCALE"] = "0"
code = '\n'.join((
'import sys',
'def dump(name):',
@@ -667,10 +668,7 @@
'dump("stdout")',
'dump("stderr")',
))
- args = [sys.executable,
- "-X", "utf8=0",
- "-X", "coerce_c_locale=0",
- "-c", code]
+ args = [sys.executable, "-c", code]
if isolated:
args.append("-I")
if encoding is not None: