]> granicus.if.org Git - python/commit
bpo-37412: os.getcwdb() now uses UTF-8 on Windows (GH-14396)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 26 Jun 2019 16:14:30 +0000 (09:14 -0700)
committerGitHub <noreply@github.com>
Wed, 26 Jun 2019 16:14:30 +0000 (09:14 -0700)
commit63429c839b19c6fe604deddcb12497443ca01a9a
tree0ef92a5da0d60cce3f576b0b47f5fd68ce9b6427
parentdd4edbc5ad4cdb47e051e7cc0801d31d3786588b
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.
(cherry picked from commit 689830ee6243126798a6c519c05aa11ba73db7cd)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
Doc/library/os.rst
Doc/whatsnew/3.8.rst
Lib/test/test_os.py
Misc/NEWS.d/next/Library/2019-06-26-16-28-59.bpo-37412.lx0VjC.rst [new file with mode: 0644]
Modules/posixmodule.c