Skip to content

Unexpected keyword argument 'retry' when using unix socket #1601

@beelze

Description

@beelze

redis-py 3.9.9, redis 6.2.6

When I tried to use unix socket connection:

db = Redis(unix_socket_path='/run/redis/.sock')
db.info()

I got error:

   1196             raise ConnectionError("Too many connections")
   1197         self._created_connections += 1
-> 1198         return self.connection_class(**self.connection_kwargs)
   1199 
   1200     def release(self, connection):

TypeError: __init__() got an unexpected keyword argument 'retry'

almost same using UnixDomainSocketConnection:

pool = redis.ConnectionPool(connection_class=redis.UnixDomainSocketConnection, path='/tmp/.sock')
db = redis.Redis(connection_pool=pool)
   1035         try:
-> 1036             return conn.retry.call_with_retry(
   1037                 lambda: self._send_command_parse_response(conn,
   1038                                                           command_name,

AttributeError: 'UnixDomainSocketConnection' object has no attribute 'retry'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions