autopkgtests failing with python 3.8

Bug #1861270 reported by Christian Ehrhardt 
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
crmsh (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

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.

Related branches

Changed in crmsh (Ubuntu):
status: New → In Progress
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
tags: added: update-excuse
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Fix uploaded to Focal.
Lets see in a while how it migrates and if all tests are good there as well.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package crmsh - 4.2.0-2ubuntu1

---------------
crmsh (4.2.0-2ubuntu1) focal; urgency=medium

  * d/p/scripts-python3.8-unittest-compatibility.patch: fix tests
    with python3.8 (LP: #1861270)

 -- Christian Ehrhardt <email address hidden> Wed, 29 Jan 2020 11:36:26 +0100

Changed in crmsh (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.