pyswagger icon indicating copy to clipboard operation
pyswagger copied to clipboard

Change to support python 3.10

Open gdhoupis opened this issue 2 years ago • 1 comments

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

gdhoupis avatar Dec 05 '23 04:12 gdhoupis

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'

warnes avatar Jun 24 '24 21:06 warnes