Skip to content

Commit 0378647

Browse files
andriilahutacarltongibson
authored andcommittedOct 23, 2019
Support Python 3.8 (django#1367)
1 parent d22b720 commit 0378647

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed
 

‎.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
env: DJANGO="Django==2.1.*"
3232
- python: "3.7"
3333
env: DJANGO="Django==2.2.*"
34+
- python: "3.8"
35+
env: DJANGO="Django==2.2.*"
3436

3537
- stage: lint
3638
install: pip install -U -e .[tests] black pyflakes isort

‎channels/utils.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import asyncio
22
import types
3-
from concurrent.futures import CancelledError
43

54

65
def name_that_thing(thing):
@@ -57,5 +56,5 @@ async def await_many_dispatch(consumer_callables, dispatch):
5756
task.cancel()
5857
try:
5958
await task
60-
except CancelledError:
59+
except asyncio.CancelledError:
6160
pass

‎setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
python_requires='>=3.5',
1515
install_requires=[
1616
'Django>=1.11',
17-
'asgiref~=3.0',
17+
'asgiref~=3.2',
1818
'daphne~=2.3',
1919
],
2020
extras_require={
@@ -39,6 +39,7 @@
3939
'Programming Language :: Python :: 3.5',
4040
'Programming Language :: Python :: 3.6',
4141
'Programming Language :: Python :: 3.7',
42+
'Programming Language :: Python :: 3.8',
4243
'Topic :: Internet :: WWW/HTTP',
4344
],
4445
)

‎tests/test_testing.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from concurrent.futures import TimeoutError
1+
import asyncio
22
from urllib.parse import unquote
33

44
import pytest
@@ -121,7 +121,7 @@ async def test_timeout_disconnect():
121121
assert subprotocol is None
122122
# Test sending text (will error internally)
123123
await communicator.send_to(text_data="hello")
124-
with pytest.raises(TimeoutError):
124+
with pytest.raises(asyncio.TimeoutError):
125125
await communicator.receive_from()
126126
# Close out
127127
await communicator.disconnect()

‎tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py{36,37}-dj{11,21,22,master}
2+
envlist = py{36,37,38}-dj{11,21,22,master}
33

44
[testenv]
55
usedevelop = true

0 commit comments

Comments
 (0)
Please sign in to comment.