fbradyirl / webex_bot

Python package for a Webex Bot based on websockets.
MIT License
68 stars 44 forks source link

Python 3.10+ Support. #13

Closed pauseframes closed 2 years ago

pauseframes commented 2 years ago

Description

Running the bot doesn't work in python 3.10.0. It seems to be an issue with websockets/asyncio per the traceback logs. It looks like it was fixed in https://github.com/aaugustin/websockets/issues/916

Anyway this library can be updated to support 3.10+?

What I Did

python3.10 bot.py

/lib/python3.10/site-packages/websockets/protocol.py", line 235, in __init__
    self._drain_lock = asyncio.Lock(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/locks.py", line 77, in __init__
    super().__init__(loop=loop)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/mixins.py", line 17, in __init__
    raise TypeError(
TypeError: As of 3.10, the *loop* parameter was removed from Lock() since it is no longer necessary
pauseframes commented 2 years ago

To add - i tried to use the latest version on asyncio and websockets and still received the TypeError.

pauseframes commented 2 years ago

Error when upgrading websockets to support python 3.10.0:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
webex-bot 0.2.8 requires websockets==8.1, but you have websockets 10.1 which is incompatible.
fbradyirl commented 2 years ago

Fixed in v0.2.21