Closed
Description
Version: Confirmed on redis-py 4.3.4, still in main. Redis 7.0.5
Platform: Python 3.10, Windows 10. Any OS and python version can reproduce.
Description:
The code for LMPOP gives the direction a default argument of None
which is not a valid argument for that function and would raise an error:
>>> redis.lmpop(1, "example")
Traceback (most recent call last):
...
File "site-packages\redis\commands\core.py", line 2551, in lmpop
return self.execute_command("LMPOP", *args)
File "site-packages\redis\client.py", line 1238, in execute_command
return conn.retry.call_with_retry(
...
File "site-packages\redis\connection.py", line 108, in encode
raise DataError(
redis.exceptions.DataError: Invalid input of type: 'NoneType'. Convert to a bytes, string, int or float first.
Running something like redis.lmpop(1, "example", direction="LEFT")
would not raise an error. The other functions around here do not have a default argument for direction.
Relevant code:
redis-py/redis/commands/core.py
Lines 2552 to 2569 in 936d49f
Metadata
Metadata
Assignees
Labels
No labels