New submission from STINNER Victor <vstin...@redhat.com>:
AMD64 Fedora Rawhide Clang Installed 3.7: https://buildbot.python.org/all/#/builders/195/builds/104 FAIL: test_env_var (test.test_utf8_mode.UTF8ModeTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.7.cstratak-fedora.installed/build/target/lib/python3.7/test/test_utf8_mode.py", line 93, in test_env_var self.assertEqual(out, '0') AssertionError: '1' != '0' - 1 + 0 On the buildbot: vstinner@python-builder-rawhide$ env|grep -E 'LC_|LANG' LANG=en_US.UTF-8 vstinner@python-builder-rawhide$ locale locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" (...) LC_ALL= Extract of the test: # Cannot test with the POSIX locale, since the POSIX locale enables # the UTF-8 mode if not self.posix_locale(): # PYTHONUTF8 should be ignored if -E is used out = self.get_output('-E', '-c', code, PYTHONUTF8='1') self.assertEqual(out, '0') The problem seems to be posix_locale() which fails if the C locale has been coerced by PEP 538: POSIX_LOCALES = ('C', 'POSIX') def posix_locale(self): loc = locale.setlocale(locale.LC_CTYPE, None) return (loc in POSIX_LOCALES) This code doesn't work if LC_CTYPE is already coerced. ---------- components: Tests messages: 344603 nosy: vstinner priority: normal severity: normal status: open title: test_utf8_mode: test_env_var() fails on AMD64 Fedora Rawhide Clang Installed 3.7 versions: Python 3.7 _______________________________________ 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