mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Revert "bpo-34589: Add -X coerce_c_locale command line option (GH-9378)" (GH-9430)
* Revert "bpo-34589: Add -X coerce_c_locale command line option (GH-9378)" This reverts commitdbdee0073c
. * Revert "bpo-34589: C locale coercion off by default (GH-9073)" This reverts commit7a0791b699
. * Revert "bpo-34589: Make _PyCoreConfig.coerce_c_locale private (GH-9371)" This reverts commit188ebfa475
.
This commit is contained in:
parent
76531e2e82
commit
06e7608207
17 changed files with 87 additions and 242 deletions
|
@ -159,16 +159,13 @@ class CmdLineTest(unittest.TestCase):
|
|||
env = os.environ.copy()
|
||||
# Use C locale to get ascii for the locale encoding
|
||||
env['LC_ALL'] = 'C'
|
||||
env['PYTHONCOERCECLOCALE'] = '0'
|
||||
code = (
|
||||
b'import locale; '
|
||||
b'print(ascii("' + undecodable + b'"), '
|
||||
b'locale.getpreferredencoding())')
|
||||
p = subprocess.Popen(
|
||||
[sys.executable,
|
||||
# Disable C locale coercion and UTF-8 Mode to not use UTF-8
|
||||
"-X", "coerce_c_locale=0",
|
||||
"-X", "utf8=0",
|
||||
"-c", code],
|
||||
[sys.executable, "-c", code],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
|
||||
env=env)
|
||||
stdout, stderr = p.communicate()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue