Skip to content

Commit 2117830

Browse files
jalazizcarltongibson
authored and
Shi Feng
committed
Deprecate Python 3.6 support, add Python 3.10 (django#301)
* Deprecate Python 3.6 support, add Python 3.10 * Deprecate Python 3.6 and remove code to support Python versions < 3.7. * Add Python 3.10 to tox configuration. * Updated README/CHANGELOG. Co-authored-by: Carlton Gibson <[email protected]>
1 parent b2ea8b8 commit 2117830

File tree

6 files changed

+11
-12
lines changed

6 files changed

+11
-12
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
python-version:
17-
- 3.6
1817
- 3.7
1918
- 3.8
2019
- 3.9
20+
- "3.10"
2121
services:
2222
redis:
2323
image: redis

CHANGELOG.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Unreleased
2+
----------
3+
4+
Dropped support for Python 3.6.
5+
6+
17
3.3.1 (2021-09-30)
28
------------------
39

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ And then in your channels consumer, you can implement the handler:
219219
Dependencies
220220
------------
221221

222-
Redis >= 5.0 is required for `channels_redis`. Python 3.6 or higher is required.
222+
Redis >= 5.0 is required for `channels_redis`. Python 3.7 or higher is required.
223223

224224

225225
Used commands

channels_redis/pubsub.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import asyncio
22
import functools
33
import logging
4-
import sys
54
import types
65
import uuid
76

@@ -13,12 +12,6 @@
1312
logger = logging.getLogger(__name__)
1413

1514

16-
if sys.version_info >= (3, 7):
17-
get_running_loop = asyncio.get_running_loop
18-
else:
19-
get_running_loop = asyncio.get_event_loop
20-
21-
2215
def _wrap_close(proxy, loop):
2316
original_impl = loop.close
2417

@@ -74,7 +67,7 @@ def deserialize(self, message):
7467
return msgpack.unpackb(message)
7568

7669
def _get_layer(self):
77-
loop = get_running_loop()
70+
loop = asyncio.get_running_loop()
7871

7972
try:
8073
layer = self._layers[loop]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
zip_safe=False,
3030
packages=find_packages(exclude=["tests"]),
3131
include_package_data=True,
32-
python_requires=">=3.6",
32+
python_requires=">=3.7",
3333
install_requires=[
3434
"aioredis~=1.0",
3535
"msgpack~=1.0",

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist =
3-
py{36,37,38,39}
3+
py{37,38,39,310}
44
qa
55

66
[testenv]

0 commit comments

Comments
 (0)