classification
Title: test_peg_generator fails on non-UTF-8 locale
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: gvanrossum, lys.nikolaou, miss-islington, pablogsal, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2020-06-25 10:01 by serhiy.storchaka, last changed 2020-06-25 12:32 by serhiy.storchaka. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 21138 merged serhiy.storchaka, 2020-06-25 10:06
PR 21150 merged miss-islington, 2020-06-25 12:06
Messages (3)
msg372336 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-06-25 10:01
$ LC_ALL=es_US.iso88591 ./python -m test -v -m test_syntax_error_for_string test_peg_generator
...
======================================================================
ERROR: test_syntax_error_for_string (test.test_peg_generator.test_c_parser.TestCParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_peg_generator/test_c_parser.py", line 377, in test_syntax_error_for_string
    self.run_test(grammar_source, test_source)
  File "/home/serhiy/py/cpython/Lib/test/test_peg_generator/test_c_parser.py", line 85, in run_test
    assert_python_ok(
  File "/home/serhiy/py/cpython/Lib/test/support/script_helper.py", line 156, in assert_python_ok
    return _assert_python(True, *args, **env_vars)
  File "/home/serhiy/py/cpython/Lib/test/support/script_helper.py", line 140, in _assert_python
    res, cmd_line = run_python_until_end(*args, **env_vars)
  File "/home/serhiy/py/cpython/Lib/test/support/script_helper.py", line 127, in run_python_until_end
    proc = subprocess.Popen(cmd_line, stdin=subprocess.PIPE,
  File "/home/serhiy/py/cpython/Lib/subprocess.py", line 947, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/home/serhiy/py/cpython/Lib/subprocess.py", line 1752, in _execute_child
    self.pid = _posixsubprocess.fork_exec(
UnicodeEncodeError: 'latin-1' codec can't encode character '\u540d' in position 962: ordinal not in range(256)

----------------------------------------------------------------------
msg372349 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-06-25 11:31
New changeset aad8f0eeca93b2150760b5e59ed0495e47d1be1e by Serhiy Storchaka in branch 'master':
bpo-41112: Fix test_peg_generator on non-UTF-8 locales. (GH-21138)
https://github.com/python/cpython/commit/aad8f0eeca93b2150760b5e59ed0495e47d1be1e
msg372365 - (view) Author: miss-islington (miss-islington) Date: 2020-06-25 12:24
New changeset c4dfcb28f7d466de152db75e7bae9de694bf0f0e by Miss Islington (bot) in branch '3.9':
bpo-41112: Fix test_peg_generator on non-UTF-8 locales. (GH-21138)
https://github.com/python/cpython/commit/c4dfcb28f7d466de152db75e7bae9de694bf0f0e
History
Date User Action Args
2020-06-25 12:32:30serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-06-25 12:24:29miss-islingtonsetmessages: + msg372365
2020-06-25 12:06:14miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request20309
2020-06-25 11:31:42serhiy.storchakasetmessages: + msg372349
2020-06-25 11:19:01serhiy.storchakalinkissue41069 dependencies
2020-06-25 10:06:26serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request20297
2020-06-25 10:01:15serhiy.storchakacreate