pyswagger
pyswagger copied to clipboard
Change to support python 3.10
The Mapping and MutableMapping classes have moved from collections to collections.abc.
https://docs.python.org/3.10/library/collections.abc.html
This will allow running for Python 3.10
Unfortunately, this has missed at least one reference to collections.Mapping 😞
Traceback (most recent call last):
File "/home/rstudio/src/fccData/inst/python/pyswagger_test.py", line 18, in <module>
client.request(app.op['addPet'](body=pet_Tom))
File "/home/rstudio/src/fccData/inst/python/pyswagger/contrib/client/requests.py", line 71, in request
resp.apply_with(
File "/home/rstudio/src/fccData/inst/python/pyswagger/io.py", line 392, in apply_with
if isinstance(header, (collections.Mapping, MutableMapping)):
AttributeError: module 'collections' has no attribute 'Mapping'