Public bug reported:
Since python3.8 is the default tests are failing like this:
======================================================================
ERROR: Test when expressions
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/crmsh/minieval.py", line 222, in _eval
handler = self.nodes[type(node)]
KeyError: <class '_ast.Constant'>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/crmsh/scripts.py", line 134, in __str__
return str(minieval(inp, lenv)).lower()
File "/usr/lib/python3/dist-packages/crmsh/minieval.py", line 360, in minieval
return SimpleEval(env).evaluate(expr)
File "/usr/lib/python3/dist-packages/crmsh/minieval.py", line 216, in evaluate
return self._eval(ast.parse(expr.strip()).body[0].value)
File "/usr/lib/python3/dist-packages/crmsh/minieval.py", line 227, in _eval
return handler(node)
File "/usr/lib/python3/dist-packages/crmsh/minieval.py", line 270, in
_eval_compare
right = self._eval(comp)
File "/usr/lib/python3/dist-packages/crmsh/minieval.py", line 224, in _eval
raise FeatureNotAvailable("Sorry, {0} is not available in this "
crmsh.minieval.FeatureNotAvailable: Sorry, Constant is not available in this
evaluator
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/usr/share/crmsh/tests/unittests/test_scripts.py", line 910, in
test_when_expression
a1 = runtest('stringtest == "balloon"', "balloon")
File "/usr/share/crmsh/tests/unittests/test_scripts.py", line 904, in runtest
a1 = scripts.verify(scrpt,
File "/usr/lib/python3/dist-packages/crmsh/scripts.py", line 2182, in verify
actions = _process_actions(script, params)
File "/usr/lib/python3/dist-packages/crmsh/scripts.py", line 2157, in
_process_actions
when = str(action['when']).strip()
File "/usr/lib/python3/dist-packages/crmsh/scripts.py", line 136, in __str__
raise ValueError(str(err))
ValueError: Sorry, Constant is not available in this evaluator
----------------------------------------------------------------------
Ran 258 tests in 1.734s
FAILED (errors=1)
I filed an upstream issue
https://github.com/ClusterLabs/crmsh/issues/518
And got my MR accepted
https://github.com/ClusterLabs/crmsh/pull/521
This bug is about getting this into focal to get the tests working
again.
** Affects: crmsh (Ubuntu)
Importance: Undecided
Status: In Progress
** Changed in: crmsh (Ubuntu)
Status: New => In Progress
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1861270
Title:
autopkgtests failing with python 3.8
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/crmsh/+bug/1861270/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs