diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-06-26 15:31:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-26 15:31:12 (GMT) |
commit | 689830ee6243126798a6c519c05aa11ba73db7cd (patch) | |
tree | 165d26fd54d4853988429c3731234cba84c6ce68 /Doc | |
parent | c6a2320e876354ee62cf8149b849bcff9492d38a (diff) | |
download | cpython-689830ee6243126798a6c519c05aa11ba73db7cd.zip cpython-689830ee6243126798a6c519c05aa11ba73db7cd.tar.gz cpython-689830ee6243126798a6c519c05aa11ba73db7cd.tar.bz2 |
bpo-37412: os.getcwdb() now uses UTF-8 on Windows (GH-14396)
The os.getcwdb() function now uses the UTF-8 encoding on Windows,
rather than the ANSI code page: see PEP 529 for the rationale. The
function is no longer deprecated on Windows.
os.getcwd() and os.getcwdb() now detect integer overflow on memory
allocations. On Unix, these functions properly report MemoryError on
memory allocation failure.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/os.rst | 5 | ||||
-rw-r--r-- | Doc/whatsnew/3.8.rst | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst index e7acb35..45ce643 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -1730,6 +1730,11 @@ features: Return a bytestring representing the current working directory. + .. versionchanged:: 3.8 + The function now uses the UTF-8 encoding on Windows, rather than the ANSI + code page: see :pep:`529` for the rationale. The function is no longer + deprecated on Windows. + .. function:: lchflags(path, flags) diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst index a0c881a..46e531f 100644 --- a/Doc/whatsnew/3.8.rst +++ b/Doc/whatsnew/3.8.rst @@ -1231,6 +1231,11 @@ Changes in Python behavior Changes in the Python API ------------------------- +* The :func:`os.getcwdb` function now uses the UTF-8 encoding on Windows, + rather than the ANSI code page: see :pep:`529` for the rationale. The + function is no longer deprecated on Windows. + (Contributed by Victor Stinner in :issue:`37412`.) + * :class:`subprocess.Popen` can now use :func:`os.posix_spawn` in some cases for better performance. On Windows Subsystem for Linux and QEMU User Emulation, Popen constructor using :func:`os.posix_spawn` no longer raise an |