scrapinghub / shub

Scrapinghub Command Line Client
https://shub.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
125 stars 80 forks source link

Add support for Python 3.10 #412

Closed emilbonnek closed 2 years ago

emilbonnek commented 2 years ago

At the moment users will get: ImportError: cannot import name 'MutableMapping' from 'collections' (C:\Python310\lib\collections\__init__.py)

This seems to be because of this dependency (line 4) which needs to be: from collections.abc import MutableMapping

dogweather commented 2 years ago

Yep - I just got hit by this. Is there a workaround?

I'm thinking I can install an older python with pyenv, and create a virtualenv with it to run the app.

sleao commented 2 years ago

Yep - I just got hit by this. Is there a workaround?

I'm thinking I can install an older python with pyenv, and create a virtualenv with it to run the app.

You can just open the file and change the from collections import MutableMapping to from collections.abc import MutableMapping. It worked for me.