WebexPythonSDK icon indicating copy to clipboard operation
WebexPythonSDK copied to clipboard

unable to import WebexTeamsAPI using python3.11

Open jgroetzi opened this issue 2 years ago • 3 comments

When trying to import WebexTeamsAPI from webexteamssdk in python3.11 it raises an exception:

  from webexteamssdk import WebexTeamsAPI
  File "/venv/lib/python3.11/site-packages/webexteamssdk/__init__.py", line 40, in <module>
    from .api import WebexTeamsAPI
  File "/venv/lib/python3.11/site-packages/webexteamssdk/api/__init__.py", line 25, in <module>
    from past.types import basestring
  File "/venv/lib/python3.11/site-packages/past/types/__init__.py", line 25, in <module>
    from .oldstr import oldstr
  File "/venv/lib/python3.11/site-packages/past/types/oldstr.py", line 5, in <module>
    from collections import Iterable
ImportError: cannot import name 'Iterable' from 'collections' (/usr/local/lib/python3.11/collections/__init__.py) 

jgroetzi avatar Jan 19 '23 21:01 jgroetzi

This appears to be related to deprecation of some method aliases in collections, including Iterable, vs. sourced from collections.abc: https://docs.python.org/3/whatsnew/3.10.html#removed

This should work as of future 0.18.0. webexteamssdk 1.6.1 has future in requirements.lck as 0.18.2, however the installed package shows only Requires-Dist: future in METADATA - perhaps this should specify > 0.18.0 ?

Not able to reproduce in a clean Python 3.11.1 env with webexteamssdk 1.6.1 - perhaps try upgrading the package? or otherwise figure out how to bump future above 0.18.0 in your install?

It would be interesting to know your Python version, and the output of pip freeze

dstaudt avatar Jan 20 '23 18:01 dstaudt

The version of future he's running is 0.14.3 I can replicate it with that. Seems like it would be good to change requirements.txt to include a min required version.

gumpcraca avatar Jan 20 '23 19:01 gumpcraca

@gumpcraca, want to create a PR for this? (Although this repo seems to be a bit stale right now, unfortunately)

claell avatar Apr 27 '23 11:04 claell