[New-bugs-announce] [issue37412] os.getcwdb() doesn't implement PEP 528 (UTF-8) on Windows

STINNER Victor report at bugs.python.org
Wed Jun 26 10:28:07 EDT 2019


New submission from STINNER Victor <vstinner at redhat.com>:

On Windows, os.getcwdb() is implemented using getcwd() on Windows. This function uses the ANSI code page, whereas PEP 529 "Change Windows filesystem encoding to UTF-8" is supposed to use UTF-8 for all bytes paths and filenames. Moreover, this function emits a DeprecationWarning, whereas PEP 529 was supposed to avoid the need to deprecated bytes paths and filenames on Windows.

I guess that it was forgotten in the implementation of the PEP 529. Or was it a deliberate choice?

Attached PR modify os.getcwdb() to use UTF-8.

----------
components: Library (Lib)
messages: 346620
nosy: steve.dower, vstinner
priority: normal
severity: normal
status: open
title: os.getcwdb() doesn't implement PEP 528 (UTF-8) on Windows
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37412>
_______________________________________


More information about the New-bugs-announce mailing list