[issue31565] open() doesn't use locale.getpreferredencoding()

2017-09-23 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue31565] open() doesn't use locale.getpreferredencoding()

2017-09-23 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: It is documented that the default encoding for open() and io.TextIOWrapper() is locale.getpreferredencoding(). But actually the C implementation in Python 3 uses _bootlocale.getpreferredencoding(). Monkey-patching locale.getpreferredencoding doesn't