# python3
Python 3.8.10 (default, Nov 26 2021, 20:14:08)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from collections import Mapping
<stdin>:1: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
And in 3.10 it indeed fails:
$ python3
Python 3.10.2 (main, Jan 16 2022, 17:11:27) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from collections import Mapping
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
In https://github.com/smirarab/sepp/blob/654a181565ba497fd79160ed74b1d22d1d4e2577/sepp/alignment.py#L29
Mapping
is imported directly fromcollections
. This has been deprecated since python 3.3:And in 3.10 it indeed fails:
Simple fix is: