Skip to content

Redis Cluster Support #263

@vinothprakashk

Description

@vinothprakashk

Facing the below typecase issue while trying to type case redis cluster instance to the Redis [bytes] instance

Python: 3.11
Redis: ~5.2.1
Dogpile: 1.3.3

File "/.venv311/lib/python3.11/site-packages/dogpile/cache/backends/redis.py", line 568, in _create_client
self.writer_client = typing.cast(redis.Redis[bytes], redis_cluster)
~~~~~~~~~~~^^^^^^^
File "/.pyenv/versions/3.11.10/lib/python3.11/typing.py", line 379, in inner
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
File ".pyenv/versions/3.11.10/lib/python3.11/typing.py", line 1864, in class_getitem
_check_generic(cls, params, len(cls.parameters))
File ".pyenv/versions/3.11.10/lib/python3.11/typing.py", line 290, in _check_generic
raise TypeError(f"{cls} is not a generic class")
TypeError: <class 'redis.client.Redis'> is not a generic class

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingredis

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions