Init fails in Python 3.10: `cannot import name 'Mapping' from 'collections'`
In Python 3.10, all Burlap commands fail.
To reproduce:
- Install Python 3.10
pip install burlap==0.9.92
fab local debug.run:sl
File "/home/alex/git/alphabuyer/.env/bin/fab", line 5, in <module>
from fabric.main import main
File "/home/alex/git/alphabuyer/.env/lib/python3.10/site-packages/fabric/main.py", line 12, in <module>
from collections import Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
The fabric3 fork used by Burlap is unmaintained, since upstream Fabric added Python 3 support in 2018.
The easiest fix would likely be forking fabric3
and fixing all Python 3.10-related problems, but that would also entail picking up the maintenance burden for future Python versions as well.
Bite-the-bullet fix would be switching to upstream Fabric (currently 2.6.0), but that could be even more work, since Fabric 2.0 was a rewrite with significant API changes.