-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade Redis stubs to 4.2.x #7597
Comments
A big change here and the reason why I upvoted is the addition of asyncio |
Thanks — PR welcome! |
#7675 didn't add async support. Reopening. |
Thank you for the updated redis typing. 2 things I noticed with the new types:
|
(1) is a general problem with types that are generic for type checking purposes, but not at runtime. Use: async def func(redis: "Redis[Any]", redis_key: str): # or even better Redis[str] or Redis[bytes] Alternatively, if you want to leave out the quotes, use python/typing#307 would also help with that. (2) I think we will need to override all Redis commands in the corresponding classes accordingly. This is quite a big task, but all PRs are welcome. |
redis-py has introduced an asyncio module since 4.2 and almost all commands should be async if the redis.asyncio.Redis is used instead of redis.Redis. This changes adds the types for all core commands. Related to python#7597
redis-py has introduced an asyncio module since 4.2 and almost all commands should be async if the redis.asyncio.Redis is used instead of redis.Redis. This changes adds the types for all core commands. Related to python#7597
redis-py has introduced an asyncio module since 4.2 and almost all commands should be async if the redis.asyncio.Redis is used instead of redis.Redis. This changes adds the types for all core commands. Related to #7597
The redis-py package has been updated to 4.2.2 : https://github.com/redis/redis-py/releases/tag/v4.2.2 and currently stubs are in version 4.1.*
The text was updated successfully, but these errors were encountered: