New submission from STINNER Victor <[email protected]>:
vstinner@freebsd$ env -i LC_ALL=POSIX ./python -m test -v test_cmd_line_script
-m test_non_ascii
== CPython 3.8.0a0 (heads/master:096329f0b2, Aug 28 2018, 09:30:55) [Clang
4.0.0 (tags/RELEASE_400/final 297347)]
== FreeBSD-11.1-RELEASE-amd64-64bit-ELF little-endian
== cwd: /usr/home/vstinner/prog/python/master/build/test_python_13073
== CPU count: 2
== encodings: locale=US-ASCII, FS=ascii
Run tests sequentially
0:00:00 load avg: 0.48 [1/1] test_cmd_line_script
test_non_ascii (test.test_cmd_line_script.CmdLineTest) ... FAIL
======================================================================
FAIL: test_non_ascii (test.test_cmd_line_script.CmdLineTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/home/vstinner/prog/python/master/Lib/test/test_cmd_line_script.py", line
512, in test_non_ascii
'stdout=%r stderr=%r' % (stdout, stderr))
AssertionError: "'./@test_13073_tmp\\udce7w\\udcf0.py'" != "'<filename encoding
error>'"
- './@test_13073_tmp\udce7w\udcf0.py'
+ '<filename encoding error>'
: stdout=b"'<filename encoding error>'\n" stderr=b"Failed checking if argv[0]
is an import path entry\nUnicodeEncodeError: 'ascii' codec can't encode
character '\\xe7' in position 17: ordinal not in range(128)"
----------------------------------------------------------------------
Ran 1 test in 0.093s
FAILED (failures=1)
test test_cmd_line_script failed
test_cmd_line_script failed
== Tests result: FAILURE ==
1 test failed:
test_cmd_line_script
Total duration: 170 ms
Tests result: FAILURE
By the way, the UTF-8 Mode is not enabled by the POSIX locale:
vstinner@freebsd$ env -i LC_ALL=POSIX ./python -c 'import sys;
print(sys.flags.utf8_mode)'
0
It contradicts the PEP 540 which says the the UTF-8 Mode is enabled by the
POSIX locale:
https://www.python.org/dev/peps/pep-0540/#abstract
> This mode is off by default, but is automatically activated when using the
> "POSIX" locale.
----------
components: Interpreter Core
messages: 324230
nosy: ncoghlan, vstinner
priority: normal
severity: normal
status: open
title: On FreeBSD, Python 3 doesn't support support the POSIX locale
versions: Python 3.7, Python 3.8
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue34527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com