New submission from STINNER Victor <vstin...@python.org>:
On Windows 10 version 1903, 3 locale tests fail: vstinner@WIN C:\vstinner\python\3.8>python -m test -v test_locale test__locale ====================================================================== ERROR: test_getsetlocale_issue1813 (test.test_locale.TestMiscellaneous) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\vstinner\python\3.8\lib\test\test_locale.py", line 567, in test_getsetlocale_issue1813 locale.setlocale(locale.LC_CTYPE, loc) File "C:\vstinner\python\3.8\lib\locale.py", line 608, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting ====================================================================== ERROR: test_float_parsing (test.test__locale._LocaleTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\vstinner\python\3.8\lib\test\test__locale.py", line 184, in test_float_parsing if localeconv()['decimal_point'] != '.': UnicodeDecodeError: 'locale' codec can't decode byte 0xa0 in position 0: decoding error ====================================================================== ERROR: test_lc_numeric_localeconv (test.test__locale._LocaleTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\vstinner\python\3.8\lib\test\test__locale.py", line 130, in test_lc_numeric_localeconv formatting = localeconv() UnicodeDecodeError: 'locale' codec can't decode byte 0xa0 in position 0: decoding error test_float_parsing() fails for locales: * "ka_GE" * "fr_FR.UTF-8" test_lc_numeric_localeconv() fails for locales: * 'ka_GE' * 'fr_FR.UTF-8' * 'ps_AF' test_getsetlocale_issue1813() fails with: testing with ('tr_TR', 'ISO8859-9') Example: vstinner@WIN C:\vstinner\python\3.8>python Running Release|x64 interpreter... Python 3.8.0b4+ (heads/pr/16490:8a204fd07c, Sep 30 2019, 14:29:53) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import locale >>> locale.setlocale(locale.LC_CTYPE, 'tr_TR') 'tr_TR' >>> loc=locale.getlocale(locale.LC_CTYPE) >>> loc ('tr_TR', 'ISO8859-9') >>> locale.setlocale(locale.LC_CTYPE, loc) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\vstinner\python\3.8\lib\locale.py", line 608, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting # It works using the low-level _locale module # which doesn't parse setlocale() output >>> import _locale >>> _locale.setlocale(_locale.LC_CTYPE, None) 'tr_TR' >>> locale.setlocale(locale.LC_CTYPE, "tr_TR") 'tr_TR' ---------- messages: 353570 nosy: vstinner priority: normal severity: normal status: open title: test_locale and test__locale failures on Windows _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38324> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com