[issue34527] On FreeBSD, Python 3 doesn't support support the POSIX locale

2018-08-29 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-34485. Example:

New changeset 0b9ea4b211b24464c7d38f63e45e51c275c52dcd by Victor Stinner in 
branch '3.7':
[3.7] bpo-34485: stdout uses surrogateescape on POSIX locale (GH-8986) (GH-8987)
https://github.com/python/cpython/commit/0b9ea4b211b24464c7d38f63e45e51c275c52dcd

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34527] On FreeBSD, Python 3 doesn't support support the POSIX locale

2018-08-28 Thread STINNER Victor


STINNER Victor  added the comment:

I wanted to quickly fix this issue since I'm working on 3 different issues 
where I got conflicts with these changes, and the other issues were impacted by 
this bug.

I sent an email to python-dev about this issue:
https://mail.python.org/pipermail/python-dev/2018-August/155052.html

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34527] On FreeBSD, Python 3 doesn't support support the POSIX locale

2018-08-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4ff38870b1de8a3add5357edf125c2866bc42b54 by Victor Stinner in 
branch '3.6':
bpo-34527: Fix FreeBSD with POSIX locale (GH-8975)
https://github.com/python/cpython/commit/4ff38870b1de8a3add5357edf125c2866bc42b54


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34527] On FreeBSD, Python 3 doesn't support support the POSIX locale

2018-08-28 Thread STINNER Victor


STINNER Victor  added the comment:

Note: Python 2.7 is not affected: it doesn't have "force_ascii" and 
"LC_ALL=POSIX ./python -m test test_cmd_line_script" pass successfully.

--
versions: +Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34527] On FreeBSD, Python 3 doesn't support support the POSIX locale

2018-08-28 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +8448

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34527] On FreeBSD, Python 3 doesn't support support the POSIX locale

2018-08-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 65ef7425a32ee411d8047a4fad0fc6bb9ff733b1 by Victor Stinner in 
branch '3.7':
bpo-34527: POSIX locale enables the UTF-8 Mode (GH-8972) (GH-8974)
https://github.com/python/cpython/commit/65ef7425a32ee411d8047a4fad0fc6bb9ff733b1


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34527] On FreeBSD, Python 3 doesn't support support the POSIX locale

2018-08-28 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +8447

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34527] On FreeBSD, Python 3 doesn't support support the POSIX locale

2018-08-28 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5cb258950ce9b69b1f65646431c464c0c17b1510 by Victor Stinner in 
branch 'master':
bpo-34527: POSIX locale enables the UTF-8 Mode (GH-8972)
https://github.com/python/cpython/commit/5cb258950ce9b69b1f65646431c464c0c17b1510


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34527] On FreeBSD, Python 3 doesn't support support the POSIX locale

2018-08-28 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +8445
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34527] On FreeBSD, Python 3 doesn't support support the POSIX locale

2018-08-28 Thread STINNER Victor


New submission from STINNER Victor :

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'" != "''"
- './@test_13073_tmp\udce7w\udcf0.py'
+ ''
 : stdout=b"''\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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com