Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ There are two available implementations:

Both layers support a single-server and sharded configurations.

`channels_redis` is tested against Python 3.8 to 3.13, `redis-py` versions 4.6,
`channels_redis` is tested against Python 3.9 to 3.13, `redis-py` versions 4.6,
5.0, and the development branch, and Channels versions 3, 4 and the development
branch there.

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
zip_safe=False,
packages=find_packages(exclude=["tests"]),
include_package_data=True,
python_requires=">=3.8",
python_requires=">=3.9",
install_requires=[
"redis>=4.6",
"msgpack~=1.0",
Expand Down
8 changes: 6 additions & 2 deletions tests/test_pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ async def test_send_receive(channel_layer):
assert message["text"] == "Ahoy-hoy!"


def test_send_receive_sync(channel_layer, event_loop):
def test_send_receive_sync(channel_layer):
event_loop = asyncio.new_event_loop()
_await = event_loop.run_until_complete
channel = _await(channel_layer.new_channel())
async_to_sync(channel_layer.send, force_new_loop=True)(
Expand All @@ -70,6 +71,7 @@ def test_send_receive_sync(channel_layer, event_loop):
message = _await(channel_layer.receive(channel))
assert message["type"] == "test.message"
assert message["text"] == "Ahoy-hoy!"
event_loop.close()


@pytest.mark.asyncio
Expand All @@ -86,7 +88,8 @@ async def test_multi_send_receive(channel_layer):
assert (await channel_layer.receive(channel))["type"] == "message.3"


def test_multi_send_receive_sync(channel_layer, event_loop):
def test_multi_send_receive_sync(channel_layer):
event_loop = asyncio.new_event_loop()
_await = event_loop.run_until_complete
channel = _await(channel_layer.new_channel())
send = async_to_sync(channel_layer.send)
Expand All @@ -96,6 +99,7 @@ def test_multi_send_receive_sync(channel_layer, event_loop):
assert _await(channel_layer.receive(channel))["type"] == "message.1"
assert _await(channel_layer.receive(channel))["type"] == "message.2"
assert _await(channel_layer.receive(channel))["type"] == "message.3"
event_loop.close()


@pytest.mark.asyncio
Expand Down
8 changes: 6 additions & 2 deletions tests/test_pubsub_sentinel.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ async def test_send_receive(channel_layer):
assert message["text"] == "Ahoy-hoy!"


def test_send_receive_sync(channel_layer, event_loop):
def test_send_receive_sync(channel_layer):
event_loop = asyncio.new_event_loop()
_await = event_loop.run_until_complete
channel = _await(channel_layer.new_channel())
async_to_sync(channel_layer.send, force_new_loop=True)(
Expand All @@ -51,6 +52,7 @@ def test_send_receive_sync(channel_layer, event_loop):
message = _await(channel_layer.receive(channel))
assert message["type"] == "test.message"
assert message["text"] == "Ahoy-hoy!"
event_loop.close()


@pytest.mark.asyncio
Expand All @@ -67,7 +69,8 @@ async def test_multi_send_receive(channel_layer):
assert (await channel_layer.receive(channel))["type"] == "message.3"


def test_multi_send_receive_sync(channel_layer, event_loop):
def test_multi_send_receive_sync(channel_layer):
event_loop = asyncio.new_event_loop()
_await = event_loop.run_until_complete
channel = _await(channel_layer.new_channel())
send = async_to_sync(channel_layer.send)
Expand All @@ -77,6 +80,7 @@ def test_multi_send_receive_sync(channel_layer, event_loop):
assert _await(channel_layer.receive(channel))["type"] == "message.1"
assert _await(channel_layer.receive(channel))["type"] == "message.2"
assert _await(channel_layer.receive(channel))["type"] == "message.3"
event_loop.close()


@pytest.mark.asyncio
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py{38,39,310,311,312,313}-ch{30,40,main}-redis50
py{39,310,311,312,313}-ch{30,40,main}-redis50
py311-chmain-redis{45,46,50,main}
qa

Expand Down