Skip to content

Conversation

@bluca
Copy link
Contributor

@bluca bluca commented Oct 28, 2025

It has been observed that manipulating locales in Debian environment, tests are failing.

======================================================================
ERROR: test_custom_querying (tests.test_reldep.Reldep)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/reprotest.wOQ8sL/build-experiment-1/build-experiment-1/python/hawkey/tests/tests/test_reldep.py", line 78, in test_custom_querying
    reldep = hawkey.Reldep(self.sack, u"\u0159 >= 3")
_hawkey.ValueException: Wrong reldep format: \u0159 >= 3

It has been observed that manipulating locales in Debian
environment, tests are failing.

======================================================================
ERROR: test_custom_querying (tests.test_reldep.Reldep)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/reprotest.wOQ8sL/build-experiment-1/build-experiment-1/python/hawkey/tests/tests/test_reldep.py", line 78, in test_custom_querying
    reldep = hawkey.Reldep(self.sack, u"\u0159 >= 3")
_hawkey.ValueException: Wrong reldep format: \u0159 >= 3
@bluca bluca requested a review from a team as a code owner October 28, 2025 21:33
@bluca bluca requested review from ppisar and removed request for a team October 28, 2025 21:33
@ppisar
Copy link
Contributor

ppisar commented Oct 29, 2025

The tested code reldep = hawkey.Reldep(self.sack, u"\u0159 >= 3") should work regardless of locale. I worry that changing locale only hides the real bug. Eitherin libdnf or in your system (Python, libsolv).

I cannot reproduce the failure whatever locale I use in Fedora 44. What locale do you have the problem with? What Debian system is it?

Why does your fix set 3 different variables to two different locales?

The reported error message looks like an exception from Dependency::getReldepId() in libdnf/repo/solvable/Dependency.cpp. Could you debug what actually happens?

Does your Python supports Unicode strings properly? The test was explicitly added to test handling Unicode strings passed from Python to (see commit 176baea), later changed by commit 27237a1.

@ppisar ppisar self-assigned this Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants