[New-bugs-announce] [issue41113] test_warnings fails on non-Western locales

Serhiy Storchaka report at bugs.python.org
Thu Jun 25 07:16:47 EDT 2020


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

$ LC_ALL=uk_UA.koi8u ./python -m test -v -m test_nonascii test_warnings
...
======================================================================
ERROR: test_nonascii (test.test_warnings.CEnvironmentVariableTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_warnings/__init__.py", line 1201, in test_nonascii
    rc, stdout, stderr = assert_python_ok("-c",
  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 1739, in _execute_child
    env_list.append(k + b'=' + os.fsencode(v))
  File "/home/serhiy/py/cpython/Lib/os.py", line 812, in fsencode
    return filename.encode(encoding, errors)
  File "/home/serhiy/py/cpython/Lib/encodings/koi8_u.py", line 12, in encode
    return codecs.charmap_encode(input,errors,encoding_table)
UnicodeEncodeError: 'charmap' codec can't encode character '\xf3' in position 16: character maps to <undefined>

----------
components: Tests
messages: 372344
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: test_warnings fails on non-Western locales
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41113>
_______________________________________


More information about the New-bugs-announce mailing list