-
Notifications
You must be signed in to change notification settings - Fork 49
Description
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