bpo-46659: test.support avoids locale.getdefaultlocale() (GH-31167) · python/cpython@06b8f16 (original) (raw)
Navigation Menu
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 06b8f16
skip_if_buggy_ucrt_strfptime() of test.support now uses locale.getpreferredencoding(False) instead of locale.getdefaultlocale() to get the Windows code page.
File tree
1 file changed
lines changed
1 file changed
lines changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1421,7 +1421,7 @@ def skip_if_buggy_ucrt_strfptime(test): | ||
| 1421 | 1421 | global _buggy_ucrt |
| 1422 | 1422 | if _buggy_ucrt is None: |
| 1423 | 1423 | if(sys.platform == 'win32' and |
| 1424 | -locale.getdefaultlocale()[1] == 'cp65001' and | |
| 1424 | +locale.getpreferredencoding(False) == 'cp65001' and | |
| 1425 | 1425 | time.localtime().tm_zone == ''): |
| 1426 | 1426 | _buggy_ucrt = True |
| 1427 | 1427 | else: |