diff --git a/.travis.yml b/.travis.yml index 46a7364be..a37a055bd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,8 @@ jobs: env: DJANGO="Django==2.1.*" - python: "3.7" env: DJANGO="Django==2.2.*" + - python: "3.8" + env: DJANGO="Django==2.2.*" - stage: lint install: pip install -U -e .[tests] black pyflakes isort diff --git a/channels/utils.py b/channels/utils.py index d1813e1c3..19c0d482e 100644 --- a/channels/utils.py +++ b/channels/utils.py @@ -1,6 +1,5 @@ import asyncio import types -from concurrent.futures import CancelledError def name_that_thing(thing): @@ -57,5 +56,5 @@ async def await_many_dispatch(consumer_callables, dispatch): task.cancel() try: await task - except CancelledError: + except asyncio.CancelledError: pass diff --git a/setup.py b/setup.py index 65db88137..c6d48aacc 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ python_requires='>=3.5', install_requires=[ 'Django>=1.11', - 'asgiref~=3.0', + 'asgiref~=3.2', 'daphne~=2.3', ], extras_require={ @@ -39,6 +39,7 @@ 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'Topic :: Internet :: WWW/HTTP', ], ) diff --git a/tests/test_testing.py b/tests/test_testing.py index 0d8c5c7b0..a67cca383 100644 --- a/tests/test_testing.py +++ b/tests/test_testing.py @@ -1,4 +1,4 @@ -from concurrent.futures import TimeoutError +import asyncio from urllib.parse import unquote import pytest @@ -121,7 +121,7 @@ async def test_timeout_disconnect(): assert subprotocol is None # Test sending text (will error internally) await communicator.send_to(text_data="hello") - with pytest.raises(TimeoutError): + with pytest.raises(asyncio.TimeoutError): await communicator.receive_from() # Close out await communicator.disconnect() diff --git a/tox.ini b/tox.ini index f24a61445..3dd39f4f9 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{36,37}-dj{11,21,22,master} +envlist = py{36,37,38}-dj{11,21,22,master} [testenv] usedevelop = true