Skip to content

Default client does not pass blocking kwarg through lock method #596

Closed
@thenewguy

Description

@thenewguy

Traceback:

    lock = cache_redis_lock.lock(name, blocking=False, timeout=240)
  File "/home/vagrant/.tox/py37/lib/python3.7/site-packages/django_redis/cache.py", line 31, in _decorator
    return method(self, *args, **kwargs)
  File "/home/vagrant/.tox/py37/lib/python3.7/site-packages/django_redis/cache.py", line 173, in lock
    return self.client.lock(*args, **kwargs)
TypeError: lock() got an unexpected keyword argument 'blocking'

This should be an acceptable kwarg per https://github.com/redis/redis-py/blob/3.5.3/redis/lock.py#L74 and the threading.Lock implementation.

It is not listed in the lock signature on the default client at https://github.com/jazzband/django-redis/blob/5.0.0/django_redis/client/default.py#L329

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions