STINNER Victor <vstin...@redhat.com> added the comment:
It seems like test_utf8_mode has a bug, but sadly I'm no longer able to reproduce it and so I cannot test my fix: diff --git a/Lib/test/test_utf8_mode.py b/Lib/test/test_utf8_mode.py index bdb93457cf..c22b95d54d 100644 --- a/Lib/test/test_utf8_mode.py +++ b/Lib/test/test_utf8_mode.py @@ -22,6 +22,16 @@ class UTF8ModeTests(unittest.TestCase): } def posix_locale(self): + try: + import _testinternalcapi + except ImportError: + pass + else: + pre_config = _testinternalcapi.get_configs()["pre_config"] + if pre_config["coerce_c_locale"] > 0: + # C locale has been coerced + return True + loc = locale.setlocale(locale.LC_CTYPE, None) return (loc in POSIX_LOCALES) I close the issue. Reopen it if you are able to reproduce the bug. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37154> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com