EsiPy icon indicating copy to clipboard operation
EsiPy copied to clipboard

python 3.10 does not work because of pyswagger error

Open fboerman opened this issue 3 years ago • 3 comments

hi, it seems that python 3.10 has unfortunately broken pyswagger due to a change in the collections library. an example:

  File "<snip>/venv/lib/python3.10/site-packages/esipy/__init__.py", line 6, in <module>
    from .client import EsiClient  # noqa
  File "<snip>/venv/lib/python3.10/site-packages/esipy/client.py", line 13, in <module>
    from pyswagger.core import BaseClient
  File "<snip>/venv/lib/python3.10/site-packages/pyswagger/__init__.py", line 3, in <module>
    from .getter import Getter
  File "<snip>/venv/lib/python3.10/site-packages/pyswagger/getter.py", line 3, in <module>
    from .utils import patch_path
  File "<snip>/venv/lib/python3.10/site-packages/pyswagger/utils.py", line 599, in <module>
    class CaseInsensitiveDict(collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'

now pyswagger is unfortunately a dead project (explained here) so I am going to list the patch to get it working here. I forked pyswagger and fixed it here: https://github.com/fboerman/pyswagger/

Now I am not sure what is the best way to fix this for this library since it cant be fixed upstream. Easiest would be to fork pyswagger and attach to this project but that would suggest putting efforts in maintaining it, which is probably not what maintainers of esipy want. So I am posting this as an open question to them as well as a reference for others with this problem.

fboerman avatar Feb 12 '22 22:02 fboerman

yeah... no, i don't want to maintain it (i'm basically alone for esipy, except the few pull request I had), without time (and i don't dev really anymore) to keep it running.

For now I can update the pyswagger version from the setup.py to add this version (if you published it in pypi)

Switching to another lib can be a solution, but iirc there's already a python lib for ESI using bravado ? I don't know if it'd worth it, as bravado doesn't have the same philosophy as pyswagger had.

If you guys have any idea / solution, i'm all ears

Kyria avatar Feb 15 '22 16:02 Kyria

hi @Kyria very understandable. I'll try to publish a version soon

fboerman avatar Feb 17 '22 21:02 fboerman

See my comment here: https://github.com/pyopenapi/pyswagger/issues/193#issuecomment-1069160150

Perhaps you could add interest to the issue as well as you do seem to have an advantage to have this project properly maintained.

jsenecal avatar Mar 16 '22 14:03 jsenecal