Open Cellebyte opened 2 years ago
Workaround in pytos\common\rest_requests.py
insert
from collections import abc as collections
instead of the top line
@marioland the workaround only works when you manually patch the library. Would be better to fix it upstream.
for the people waiting for #52 I have a working hotfix.
# <project_name>/_hotfix.py
from collections.abc import MutableMapping, Mapping
from collections import (
ChainMap,
namedtuple,
OrderedDict,
deque,
defaultdict,
Counter,
UserDict,
UserList,
UserString,
)
from collections import abc
__all__ = [
"ChainMap",
"MutableMapping",
"Mapping",
"namedtuple",
"OrderedDict",
"abc",
"deque",
"defaultdict",
"Counter",
"UserDict",
"UserList",
"UserString",
]
# <project_name>.__init__.py
import sys
import <project_name>._hotfix as collections
sys.modules["collections"] = collections
As of the new python release 3.10.x some modules which are used as a dependency are not working for pytos. It would be great if the dependencies can be updated to work also with python 3.10.
https://bugs.python.org/issue25988