Skip to content

Commit 7a12908

Browse files
authored
Merge branch 'master' into add_connect_tests
2 parents 3ea7246 + 4856813 commit 7a12908

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

redis/asyncio/connection.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
)
2626
from urllib.parse import ParseResult, parse_qs, unquote, urlparse
2727

28-
if sys.version_info.major >= 3 and sys.version_info.minor >= 11:
28+
# the functionality is available in 3.11.x but has a major issue before
29+
# 3.11.3. See https://github.com/redis/redis-py/issues/2633
30+
if sys.version_info >= (3, 11, 3):
2931
from asyncio import timeout as async_timeout
3032
else:
3133
from async_timeout import timeout as async_timeout

redis/connection.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1155,8 +1155,9 @@ def _connect(self):
11551155
class UnixDomainSocketConnection(AbstractConnection):
11561156
"Manages UDS communication to and from a Redis server"
11571157

1158-
def __init__(self, path="", **kwargs):
1158+
def __init__(self, path="", socket_timeout=None, **kwargs):
11591159
self.path = path
1160+
self.socket_timeout = socket_timeout
11601161
super().__init__(**kwargs)
11611162

11621163
def repr_pieces(self):

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
install_requires=[
3535
'importlib-metadata >= 1.0; python_version < "3.8"',
3636
'typing-extensions; python_version<"3.8"',
37-
'async-timeout>=4.0.2; python_version<"3.11"',
37+
'async-timeout>=4.0.2; python_version<="3.11.2"',
3838
],
3939
classifiers=[
4040
"Development Status :: 5 - Production/Stable",

tests/test_asyncio/test_pubsub.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
from typing import Optional
66
from unittest.mock import patch
77

8-
if sys.version_info.major >= 3 and sys.version_info.minor >= 11:
8+
# the functionality is available in 3.11.x but has a major issue before
9+
# 3.11.3. See https://github.com/redis/redis-py/issues/2633
10+
if sys.version_info >= (3, 11, 3):
911
from asyncio import timeout as async_timeout
1012
else:
1113
from async_timeout import timeout as async_timeout

0 commit comments

Comments
 (0)