[issue25359] io.open() fails to open ascii file if LANG env not set
Serhiy Storchaka
report at bugs.python.org
Sat Sep 23 17:42:07 EDT 2017
Serhiy Storchaka added the comment:
There are few issues here.
1. Missed "goto error" after setting an exception in TextIOWrapper constructor. This leads to raising wrong and less informative exception (and maybe worse in Python 3, but this is harder to reproduce).
2. getpreferredencoding() can return None in rare circumferences. But no code using it (except TextIOWrapper) expects this. What is better, fail or fallback to ASCII?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25359>
_______________________________________
More information about the Python-bugs-list
mailing list