[issue21772] platform.uname() not EINTR safe
Marc-Andre Lemburg
report at bugs.python.org
Tue Jun 17 11:22:42 CEST 2014
Marc-Andre Lemburg added the comment:
On 17.06.2014 11:21, STINNER Victor wrote:
>
> STINNER Victor added the comment:
>
> "I'm not sure whether using os.fsencoding() is a good idea. The encoding used by uname is not defined anywhere and it's possible that Python using a wrong encoding may cause the call to fail (e.g. in case the host name includes non-ASCII chars)."
>
> I also expect ASCII, but I prefer os.fsdecode() because it's the encoding used almost everywhere in Python 3. It's for example the encoding (and error handler) currently used by _syscmd_uname() indirectly by TextIOWrapper.
Ok.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21772>
_______________________________________
More information about the Python-bugs-list
mailing list