open-traffic-generator/snappi-ixnetwork

'Mapping' from 'collections' support for Python3.10

Closed this issue · 1 comments

Version information
The pypi version or branch of snappi-ixnetwork

Describe the bug
According to the python official documentation they change the package

To Reproduce
Run any snappi_ixnetwork test in python3.10

Traceback (most recent call last):
  File "/home/vlad/Athena/Snappi/snappi-ixnetwork.py", line 154, in <module>
    Traffic_Test()
  File "/home/vlad/Athena/Snappi/snappi-ixnetwork.py", line 19, in Traffic_Test
    api = snappi.api(location="https://10.38.162.197:11009/", ext="ixnetwork")
  File "/home/vlad/.local/lib/python3.10/site-packages/snappi/snappi.py", line 97, in api
    raise Exception(msg % (ext, err))
Exception: Extension ixnetwork is not installed or invalid: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

Expected behavior

try:
    from collections import Mapping
except ImportError:
    from collections.abc import Mapping

Nil

Python 3.10 support added in snappi-ixnetwork v1.13.0.