Skip to content

decode_responses in StrictRedis ignored when using ConnectionPool #701

@miedzinski

Description

@miedzinski
>>> import redis
>>> p = redis.ConnectionPool()
>>> r = redis.StrictRedis(connection_pool=p, decode_responses=True)
>>> r.set('key', 'value')
True
>>> r.get('key')
b'value'  # should be just value (unicode instead of bytes)

I am aware that the problem arises from ConnectionPool passing its' own arguments to Connection, which is why some would say it is desired behaviour. On the other hand I don't understand why the parser is created per Connection, not per client - wouldn't it actually solve the issue?

Thanks.

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