Skip to content

Change to support python 3.10#199

Open
gdhoupis wants to merge 1 commit intopyopenapi:developfrom
gdhoupis:support_python_3_10
Open

Change to support python 3.10#199
gdhoupis wants to merge 1 commit intopyopenapi:developfrom
gdhoupis:support_python_3_10

Conversation

@gdhoupis
Copy link

@gdhoupis gdhoupis commented Dec 5, 2023

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

@warnes
Copy link

warnes commented Jun 24, 2024

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants