pyswagger icon indicating copy to clipboard operation
pyswagger copied to clipboard

Python 3.10 removed `MutableMapping` from `collections`

Open arsdragonfly opened this issue 3 years ago • 3 comments

File ~/eve-notebook/.venv/lib/python3.10/site-packages/esipy/client.py:13, in 10 from collections import namedtuple 12 import six ---> 13 from pyswagger.core import BaseClient 14 from requests import Request 15 from requests import Session

File ~/eve-notebook/.venv/lib/python3.10/site-packages/pyswagger/init.py:3, in 1 version = '0.8.39' ----> 3 from .getter import Getter 4 from .core import App, Security 6 # backward compatible

File ~/eve-notebook/.venv/lib/python3.10/site-packages/pyswagger/getter.py:3, in 1 from future import absolute_import 2 from .consts import private ----> 3 from .utils import patch_path 4 import json 5 import yaml

File ~/eve-notebook/.venv/lib/python3.10/site-packages/pyswagger/utils.py:599, in 594 path = path[1:] 596 return path --> 599 class CaseInsensitiveDict(collections.MutableMapping): 600 """ a case insensitive dict: 601 - allow to query with case insensitive keys (get, in) 602 - iteration would return original key (...) 606 https://github.com/requests/ 607 """ 609 def init(self):

AttributeError: module 'collections' has no attribute 'MutableMapping'

arsdragonfly avatar Aug 02 '22 16:08 arsdragonfly

tried this package which souded good for my purpose, but failed too because of python 3.10. Who can fix this?

hcw70 avatar Oct 17 '22 14:10 hcw70

best option is to fork and fix/maintain yourself, no sign of the repo owner/maintainer accepting PRs since 2018.

Randori-Lance avatar Nov 23 '22 20:11 Randori-Lance

Renaming the references collections.Mapping and collections.MutableMapping to collections.abc.Mapping and collectionis.abc.MutableMapping in io.py fixes it for python 3.10.

Ermineia avatar Dec 04 '23 22:12 Ermineia