Closed
Description
redis-py supports setting decode_responses on the creation of the main objects (i.e redis.Redis(decode_responses=True), but in many use cases, it would serve to:
- Know whether or not the connection decodes or encodes responses
- Toggle this behaviour
This is important for the behaviour of varying commands. Some commands (e.g. dump) should return a binary blob regardless - meaning in a connection with a decode_responses=True, one cannot call functions such as dump. Furthermore, anyone wanting to implement custom commands, is left to the mercy of the connection object(s) that have been instantiated.
Allowing the user to toggle this behaviour, means that within a given connection a user has ultimate control of behaviour in cases where they explicitly require it.