Stefan Krah added the comment:
Some of the buildbots are failing with the new test:
==
FAIL: test_non_utf8 (test.test_cmd_line_script.CmdLineTest)
--
Traceback
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16218
___
___
Python-bugs-list mailing list
Jesús Cea Avión added the comment:
Reopening bug.
Quite a few buildbots are failing with this patch. Please, commit a new version
or revert.
--
resolution: fixed -
stage: committed/rejected - commit review
status: closed - open
___
Python tracker
Andrew Svetlov added the comment:
I see. Sorry, my fault.
Give me weekend to figure out why it fails.
Thanks.
--
assignee: - asvetlov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16218
Changes by Brian Curtin br...@python.org:
--
nosy: -brian.curtin
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16218
___
___
Python-bugs-list
Serhiy Storchaka added the comment:
I was not able to reproduce this error, I got other errors. The issue not in
Python interpreter, the test is broken. Here is a patch that might solve the
issue on some platforms (need to test on Windows).
I guess failing of all command line tests when the
Stefan Krah added the comment:
Serhiy, your original example from msg173373 still fails on
FreeBSD:
$ name=$(printf \xff)
$ echo print('Hello, world') $name
$ ./python $name
UnicodeEncodeError: 'ascii' codec can't encode character '\xff' in position 0:
ordinal not in range(128)
[41257 refs]
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:
--
nosy: -vinay.sajip
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16218
___
___
Serhiy Storchaka added the comment:
Serhiy, your original example from msg173373 still fails on
FreeBSD:
Thank you for a report. I have not any ideas what happened (note that
error on encoding, not decoding). Can you please show me the results of
sys.getdefaultencoding(),
Stefan Krah added the comment:
This is it:
sys.getdefaultencoding()
'utf-8'
sys.getfilesystemencoding()
'ascii'
locale.getpreferredencoding(True)
'US-ASCII'
locale.getpreferredencoding(False)
'US-ASCII'
$ locale
LANG=
LC_CTYPE=C
LC_COLLATE=C
LC_TIME=C
LC_NUMERIC=C
LC_MONETARY=C
Andrew Svetlov added the comment:
Perhaps we have to skip tests if filesystem encoding doesn't support wide
characters.
Not sure about the way: should we skip if sys.getfilesystemencoding() is not
utf8 or better to try encode path and skip if it fails?
I think the later is better.
--
Stefan Krah added the comment:
On FreeBSD both Serhiy's original test case as well as the unit test work
if the locale is ISO8859-15:
sys.getdefaultencoding()
'utf-8'
sys.getfilesystemencoding()
'iso8859-15'
locale.getpreferredencoding(True)
'ISO8859-15'
locale.getpreferredencoding(False)
Andrew Svetlov added the comment:
Looking on the last message from Stefan I think we have to check cmdpath to be
encoded via sys.getfilesystemencoding() first and skip test if fails.
--
___
Python tracker rep...@bugs.python.org
Stefan Krah added the comment:
That sounds good for Unix.
For Windows I'm getting a more informative error message than from the
buildbot output if I run the test via an ssh client:
==
Andrew Svetlov added the comment:
I will fix it tomorrow at Kiev Python sprint.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16218
___
___
Serhiy Storchaka added the comment:
For Windows I'm getting a more informative error message than from the
buildbot output if I run the test via an ssh client:
Try with my last patch (pythonrun_filename_decoding_test.patch). It
fixes also fail on Linux with 8-bit locale.
$
Stefan Krah added the comment:
Serhiy Storchaka rep...@bugs.python.org wrote:
Try with my last patch (pythonrun_filename_decoding_test.patch). It
fixes also fail on Linux with 8-bit locale.
Unfortunately your last patch does not work on Windows. -- I'm too lazy
to step through the domain
Roundup Robot added the comment:
New changeset 02d25098ad57 by Andrew Svetlov in branch '3.3':
Issue #16218: Support non ascii characters in python launcher.
http://hg.python.org/cpython/rev/02d25098ad57
New changeset 1267d64c14b3 by Andrew Svetlov in branch 'default':
Merge issue #16218:
Andrew Svetlov added the comment:
Fixed. Thanks, Serhiy.
--
nosy: +asvetlov
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16218
Vinay Sajip added the comment:
I'm not especially familiar with this code, but just trying to understand - how
come filename_obj isn't decref'd on normal exit?
--
nosy: +vinay.sajip
___
Python tracker rep...@bugs.python.org
Andrew Svetlov added the comment:
Vinay, it's processed in
PyObject_CallFunction(loader_type, sN, __main__, filename_obj)
Please note sN format istead sO.
N means PyObject* is passed but unlike sO that object is not increfed.
--
___
Python tracker
Vinay Sajip added the comment:
Please note sN format istead sO.
I see. Thanks.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16218
___
___
Serhiy Storchaka added the comment:
Test added.
--
stage: test needed - patch review
Added file: http://bugs.python.org/file27707/pythonrun_filename_decoding_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16218
Serhiy Storchaka added the comment:
I can reproduce this on Linux (3.3+ only):
$ name=$(printf \xff)
$ echo print('Hello, world') $name
$ ./python $name
python: failed to set __main__.__loader__
The issue is in PyRun_SimpleFileExFlags() function, which gets raw char * as
the file name (the
Serhiy Storchaka added the comment:
Here is a patch which fixes filename decoding error in
PyRun_SimpleFileExFlags().
--
keywords: +patch
Added file: http://bugs.python.org/file27630/pythonrun_filename_decoding.patch
___
Python tracker
STINNER Victor added the comment:
The patch looks correct, but a test is missing.
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16218
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
stage: - test needed
type: crash - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16218
___
Serhiy Storchaka added the comment:
Where we have tests for Python launch? I can't find. runpy is not affected.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16218
___
Changes by Gertjan Klein gkl...@xs4all.nl:
--
nosy: +gklein
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16218
___
___
Python-bugs-list mailing
Tim Golden added the comment:
Confirming that this doesn't happen on 2.7
py -2 £.py succeeds
py -3 £.py gives:
python: failed to set __main__.__loader__
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16218
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +brian.curtin, tim.golden
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16218
___
___
New submission from Turn:
If there are non ASCII character in the py.exe arguments, the execution will
fail. The script file name or path may contain non ASCII characters.
--
components: Windows
messages: 172807
nosy: turncc
priority: normal
severity: normal
status: open
title: Python
Changes by Jeremy Kloth jeremy.kloth+python-trac...@gmail.com:
--
nosy: +jkloth
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16218
___
___
33 matches
Mail list logo