Skip to content

Commit

Permalink
Merge branch 'master' into add_connect_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dvora-h authored Mar 27, 2023
2 parents 3ea7246 + 4856813 commit 7a12908
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion redis/asyncio/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
)
from urllib.parse import ParseResult, parse_qs, unquote, urlparse

if sys.version_info.major >= 3 and sys.version_info.minor >= 11:
# the functionality is available in 3.11.x but has a major issue before
# 3.11.3. See https://github.com/redis/redis-py/issues/2633
if sys.version_info >= (3, 11, 3):
from asyncio import timeout as async_timeout
else:
from async_timeout import timeout as async_timeout
Expand Down
3 changes: 2 additions & 1 deletion redis/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -1155,8 +1155,9 @@ def _connect(self):
class UnixDomainSocketConnection(AbstractConnection):
"Manages UDS communication to and from a Redis server"

def __init__(self, path="", **kwargs):
def __init__(self, path="", socket_timeout=None, **kwargs):
self.path = path
self.socket_timeout = socket_timeout
super().__init__(**kwargs)

def repr_pieces(self):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
install_requires=[
'importlib-metadata >= 1.0; python_version < "3.8"',
'typing-extensions; python_version<"3.8"',
'async-timeout>=4.0.2; python_version<"3.11"',
'async-timeout>=4.0.2; python_version<="3.11.2"',
],
classifiers=[
"Development Status :: 5 - Production/Stable",
Expand Down
4 changes: 3 additions & 1 deletion tests/test_asyncio/test_pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
from typing import Optional
from unittest.mock import patch

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

0 comments on commit 7a12908

Please sign in to comment.