[issue29241] sys._enablelegacywindowsfsencoding() don't apply to os.fsencode and os.fsdecode
Steve Dower
report at bugs.python.org
Sat Jan 21 17:45:55 EST 2017
Steve Dower added the comment:
Thanks for checking that.
I don't think it's worth retaining the cache on Windows in the face of the broken behaviour. Any real-world case where a lot of paths are being encoded or decoded is also likely to involve file-system access which will dwarf the encoding time. Further, passing bytes on Windows will result in another decode/encode cycle anyway, so there will be a bigger performance impact in using str (though even then, probably only when the str is already represented using 16-bit characters).
Unless somebody wants to make a case for having a more complex mechanism to reset the cache, I'll make the change to remove it (protected by an 'if sys.platform.startswith('win')' check).
----------
assignee: -> steve.dower
versions: +Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29241>
_______________________________________
More information about the Python-bugs-list
mailing list