Comment 0 for bug 2017719

Revision history for this message
Kenta Fukaya (fukayan) wrote : Zuul error cannot import name 'Mapping' from 'collections'

Zuul raised the error "cannot import name 'Mapping' from 'collections'",
when I run FT(function test) that tacker-compliance-devstack-multinode-sol[1].
This FT causes this error including code that can only run on python3.9 or lower.

The Robotframework used in this FT calls "from collections import Mapping",[2]
but this code can only be used with Python 3.9 or lower.
If you use Python 3.10+,
this program should call 'from collections.abc import Mapping'.

However, the latest version of the robotframework fixes this error,
but this FT uses version 3.1[3][4].

We can choose two methods to fix this error.
1. Downgrade Python 3.9 or lower running in zuul.
2. Upgrade the Robotframework.

[1] https://zuul.opendev.org/t/openstack/build/821d9e0ca36b46ad8113c8a1d02b9ce3
[2] https://github.com/robotframework/robotframework/blob/v3.1/src/robot/utils/robottypes3.py#L16
[3] https://github.com/openstack/tacker/blob/master/tox.ini#L127
[4] https://forge.etsi.org/rep/nfv/api-tests/-/blob/2.6.1-fix-plu/requirements.txt#L8