Add **options to parse functions for sentinel by peperon · Pull Request #3831 · redis/redis-py (original) (raw)
NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
I’m adding the **options argument to the sentinel parsers to prevent an exception that occurs when they’re called using self.response_callbacks[command_name](response, **options):
Traceback (most recent call last):
File "/home/user/test-redispy/testbug.py", line 13, in <module>
print(conn.sentinel_master("mymaster"))
File "/usr/lib/python3.10/site-packages/redis/commands/sentinel.py", line 31, in sentinel_master
return self.execute_command(
File "/usr/lib/python3.10/site-packages/redis/client.py", line 621, in execute_command
return self._execute_command(*args, **options)
File "/usr/lib/python3.10/site-packages/redis/client.py", line 632, in _execute_command
return conn.retry.call_with_retry(
File "/usr/lib/python3.10/site-packages/redis/retry.py", line 105, in call_with_retry
return do()
File "/usr/lib/python3.10/site-packages/redis/client.py", line 633, in <lambda>
lambda: self._send_command_parse_response(
File "/usr/lib/python3.10/site-packages/redis/client.py", line 604, in _send_command_parse_response
return self.parse_response(conn, command_name, **options)
File "/usr/lib/python3.10/site-packages/redis/client.py", line 664, in parse_response
return self.response_callbacks[command_name](response, **options)
TypeError: parse_sentinel_master() got an unexpected keyword argument 'return_responses'