Support Python 3.8
Closed this issue · 0 comments
maxbrunet commented
Python 3.8.0 has been released on October 14, 2019:
https://www.python.org/downloads/release/python-380/
I have been testing my project against 3.8-dev for a few weeks and it has reported only 1 warning (4 occurrences):
DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
Full output
/home/travis/virtualenv/python3.8-dev/lib/python3.8/site-packages/mattermostdriver/websocket.py:19
/home/travis/virtualenv/python3.8-dev/lib/python3.8/site-packages/mattermostdriver/websocket.py:19: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
def connect(self, event_handler):
/home/travis/virtualenv/python3.8-dev/lib/python3.8/site-packages/mattermostdriver/websocket.py:54
/home/travis/virtualenv/python3.8-dev/lib/python3.8/site-packages/mattermostdriver/websocket.py:54: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
def _start_loop(self, websocket, event_handler):
/home/travis/virtualenv/python3.8-dev/lib/python3.8/site-packages/mattermostdriver/websocket.py:73
/home/travis/virtualenv/python3.8-dev/lib/python3.8/site-packages/mattermostdriver/websocket.py:73: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
def _authenticate_websocket(self, websocket, event_handler):
/home/travis/virtualenv/python3.8-dev/lib/python3.8/site-packages/mattermostdriver/websocket.py:103
/home/travis/virtualenv/python3.8-dev/lib/python3.8/site-packages/mattermostdriver/websocket.py:103: DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead
def _wait_for_message(self, websocket, event_handler):
Documentation:
- https://docs.python.org/3.8/library/asyncio-task.html#asyncio.coroutine
- https://docs.python.org/3.8/reference/compound_stmts.html#coroutine-function-definition
The new syntax async def
is new in Python 3.5, meaning Python 3.4 support would have to be dropped to fix these warnings. Python 3.4 having reached EOL on March 18, 2019 (https://python.org/downloads/release/python-3410), I think this should be acceptable.