Skip to content

Commit b72da7f

Browse files
Updated dependencies after asgiref v3.9. (#2168)
* Updated asgiref dependency to v3.9 ApplicationCommunicator testing utility will now return result if application is finished when sending input. Assert CancelledError rather than allowing timeout. * Dropped support for EOL Python and Django versions.
1 parent 0efba8c commit b72da7f

File tree

5 files changed

+10
-13
lines changed

5 files changed

+10
-13
lines changed

.github/workflows/tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
python-version:
17-
- "3.8"
1817
- "3.9"
1918
- "3.10"
2019
- "3.11"

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ and `tutorial <https://channels.readthedocs.io/en/latest/tutorial/index.html>`_
3535
Dependencies
3636
------------
3737

38-
All Channels projects currently support Python 3.8 and up. ``channels`` is
39-
compatible with Django 4.2 and 5.0.
38+
All Channels projects currently support Python 3.9 and up. ``channels`` is
39+
compatible with Django 4.2+.
4040

4141

4242
Contributing

setup.cfg

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,13 @@ classifiers =
1616
Operating System :: OS Independent
1717
Programming Language :: Python
1818
Programming Language :: Python :: 3
19-
Programming Language :: Python :: 3.8
2019
Programming Language :: Python :: 3.9
2120
Programming Language :: Python :: 3.10
2221
Programming Language :: Python :: 3.11
2322
Programming Language :: Python :: 3.12
2423
Programming Language :: Python :: 3.13
2524
Framework :: Django
2625
Framework :: Django :: 4.2
27-
Framework :: Django :: 5.0
2826
Framework :: Django :: 5.1
2927
Framework :: Django :: 5.2
3028
Topic :: Internet :: WWW/HTTP
@@ -34,8 +32,8 @@ packages = find:
3432
include_package_data = True
3533
install_requires =
3634
Django>=4.2
37-
asgiref>=3.6.0,<4
38-
python_requires = >=3.8
35+
asgiref>=3.9.0,<4
36+
python_requires = >=3.9
3937

4038
[options.extras_require]
4139
tests =

tests/test_testing.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ async def test_websocket_application():
142142
@pytest.mark.asyncio
143143
async def test_timeout_disconnect():
144144
"""
145-
Tests that disconnect() still works after a timeout.
145+
Tests that communicator.disconnect() raises after a timeout. (Application
146+
is finished.)
146147
"""
147148
communicator = WebsocketCommunicator(ErrorWebsocketApp(), "/testws/")
148149
# Test connection
@@ -153,8 +154,9 @@ async def test_timeout_disconnect():
153154
await communicator.send_to(text_data="hello")
154155
with pytest.raises(asyncio.TimeoutError):
155156
await communicator.receive_from()
156-
# Close out
157-
await communicator.disconnect()
157+
158+
with pytest.raises(asyncio.exceptions.CancelledError):
159+
await communicator.disconnect()
158160

159161

160162
class ConnectionScopeValidator(WebsocketConsumer):

tox.ini

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[tox]
22
envlist =
3-
py{38,39,310,311}-dj42
4-
py{310,311,312}-dj50
3+
py{39,310,311}-dj42
54
py{310,311,312,313}-dj51
65
py{310,311,312,313}-dj52
76
py{312,313}-djmain
@@ -13,7 +12,6 @@ commands =
1312
pytest -v {posargs}
1413
deps =
1514
dj42: Django>=4.2,<5.0
16-
dj50: Django>=5.0,<5.1
1715
dj51: Django>=5.1,<5.2
1816
dj52: Django>=5.2a1,<6.0
1917
djmain: https://github.com/django/django/archive/main.tar.gz

0 commit comments

Comments
 (0)