Hi,
Apparently, since https://review.opendev.org/c/openstack/oslo.i18n/+/873842 (not sure, but it looks like it), oslo.i18n fails to build in Debian Unstable with these 2 failures:
======================================================================
FAIL: oslo_i18n.tests.test_fixture.PrefixLazyTranslationTest.test_default
oslo_i18n.tests.test_fixture.PrefixLazyTranslationTest.test_default
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/oslo_i18n/tests/test_fixture.py", line 98, in test_default
self.assertEqual(expected_msg, _translate.translate(msg1))
File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 394, in assertEqual
self.assertThat(observed, matcher, message)
File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 481, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: 'oslo_i18n/en_US: fake msg1' != 'oslo_i18n/C: fake msg1'
======================================================================
FAIL: oslo_i18n.tests.test_fixture.PrefixLazyTranslationTest.test_extra_lang
oslo_i18n.tests.test_fixture.PrefixLazyTranslationTest.test_extra_lang
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/oslo_i18n/tests/test_fixture.py", line 114, in test_extra_lang
self.assertEqual(expected_msg_en_US, _translate.translate(msg1))
File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 394, in assertEqual
self.assertThat(observed, matcher, message)
File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 481, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: 'oslo_i18n/en_US: fake msg1' != 'oslo_i18n/C: fake msg1'
There's obviously something wrong with this patch. Note that I tried setting LANG=en_US when running unit tests, and it didn't help.
Cheers,
Thomas Goirand (zigo)
This is probably an issue caused by underlying python. Can you check the following results
import locale getdefaultlocal e() getlocale( locale. LC_CTYPE)
locale.
locale.
In my local env these two return identical results.
Python 3.11.7 (main, Dec 18 2023, 00:00:00) [GCC 13.2.1 20231011 (Red Hat 13.2.1-4)] on linux getdefaultlocal e() getdefaultlocal e' is deprecated and slated for removal in Python 3.15. Use setlocale(), getencoding() and getlocale() instead. getlocale( locale. LC_CTYPE)
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.
<stdin>:1: DeprecationWarning: 'locale.
('en_US', 'UTF-8')
>>> locale.
('en_US', 'UTF-8')