8000 bpo-46659: test.support avoids locale.getdefaultlocale() (GH-31167) · python/cpython@06b8f16 · GitHub
[go: up one dir, main page]

Skip to content

Commit 06b8f16

Browse files
authored
bpo-46659: test.support avoids locale.getdefaultlocale() (GH-31167)
skip_if_buggy_ucrt_strfptime() of test.support now uses locale.getpreferredencoding(False) instead of locale.getdefaultlocale() to get the Windows code page.
1 parent 04dd60e commit 06b8f16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/support/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1421,7 +1421,7 @@ def skip_if_buggy_ucrt_strfptime(test):
14211421
global _buggy_ucrt
14221422
if _buggy_ucrt is None:
14231423
if(sys.platform == 'win32' and
1424-
locale.getd 5603 efaultlocale()[1] == 'cp65001' and
1424+
locale.getpreferredencoding(False) == 'cp65001' and
14251425
time.localtime().tm_zone == ''):
14261426
_buggy_ucrt = True
14271427
else:

0 commit comments

Comments
 (0)
0