[issue25182] python -v crashes in nonencodable directory

2015-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > > This is not related to this issue. sys.stderr uses backslashreplace. > Ok, fine. But is related to issue25183. -- ___ Python tracker ___

[issue25182] python -v crashes in nonencodable directory

2015-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Hum, the code didn't compile anymore on Windows. I took the opportunity to > fix the errno issue that I saw. Thank you Victor. -- ___ Python tracker __

[issue25182] python -v crashes in nonencodable directory

2015-09-30 Thread STINNER Victor
STINNER Victor added the comment: Hum, the code didn't compile anymore on Windows. I took the opportunity to fix the errno issue that I saw. Note: In fact, Python/fileutils.c is a a little bit different. Functions like _Py_write() save errno to restore it later because the caller expects errno

[issue25182] python -v crashes in nonencodable directory

2015-09-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2652c1798f7d by Victor Stinner in branch '3.4': Issue #25182: Fix compilation on Windows https://hg.python.org/cpython/rev/2652c1798f7d New changeset 0eb26a4d5ffa by Victor Stinner in branch '3.5': (Merge 3.4) Issue #25182: Fix compilation on Window

[issue25182] python -v crashes in nonencodable directory

2015-09-30 Thread STINNER Victor
STINNER Victor added the comment: > This is not related to this issue. sys.stderr uses backslashreplace. Ok, fine. --- +_errno = errno; Py_END_ALLOW_THREADS +Py_XDECREF(bytes); if (n < 0) { -if (errno == EAGAIN) +if (_errno == EAGAIN) Py_RETURN_NO

[issue25182] python -v crashes in nonencodable directory

2015-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for the review Victor. > But we may need something else to escape non-encodable characters in the > filename when sys.stdout is a TextIOWrapper using the strict error handler. This is not related to this issue. sys.stderr uses backslashreplace. --

[issue25182] python -v crashes in nonencodable directory

2015-09-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6347b154dd67 by Serhiy Storchaka in branch '3.4': Issue #25182: The stdprinter (used as sys.stderr before the io module is https://hg.python.org/cpython/rev/6347b154dd67 New changeset e8b6c6c433a4 by Serhiy Storchaka in branch '3.5': Issue #25182: T

[issue25182] python -v crashes in nonencodable directory

2015-09-30 Thread STINNER Victor
STINNER Victor added the comment: > Before importing the io module sys.stderr is stdprinter. It always encodes > written string to UTF-8. Proposed patch makes it to use the backslashreplace > error handler. I like this solution. stdprinter is supposed to be replaced quickly. But we may need s

[issue25182] python -v crashes in nonencodable directory

2015-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Before importing the io module sys.stderr is stdprinter. It always encodes written string to UTF-8. Proposed patch makes it to use the backslashreplace error handler. In future perhaps we could implement stdprinter in Python. -- components: +Interpr

[issue25182] python -v crashes in nonencodable directory

2015-09-21 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue25182] python -v crashes in nonencodable directory

2015-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: python without -v is not failed. If wrap message in _bootstrap_external._verbose_message with '!%a'% and in _bootstrap._verbose_message with '%a'% (why _verbose_message is duplicated in _bootstrap and _bootstrap_external?), the output is: ... # installing z

[issue25182] python -v crashes in nonencodable directory

2015-09-19 Thread Brett Cannon
Brett Cannon added the comment: And what happens if you leave -v off? Since the failure is in Py_Initialize I want to know if that Py_FatalError trigger is avoided without -v. A possible fix to test is to simply modify importlib._bootstrap._verbose_message to catch UnicodeDecodeError and then

[issue25182] python -v crashes in nonencodable directory

2015-09-19 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: $ pwd /home/serhiy/py/cpy�thon-3.5 $ ./python -v import _frozen_importlib # frozen import _imp # builtin import sys # builtin import '_warnings' # import '_thread' # import '_weakref' # import '_frozen_importlib_external' # import '_io' # import 'marshal