Skip to content
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

Add aclose method for Redis asyncio version #12419

Closed
wants to merge 2 commits into from

Conversation

patrick91
Copy link

See original source code: https://github.com/redis/redis-py/blob/fd0b0d3eec48daa07ca37e06862e3461c8373a60/redis/asyncio/client.py#L578-L594

close is deprecated, shall we mark it as deprecated using @deprecated? 😊

@patrick91
Copy link
Author

There's quite a few failure now, after upgrading, I'm happy to fix them if you're ok with this PR :D

Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/blocks/redis.py:114: error: "Redis[bytes]" has no attribute "aclose"; maybe "close"?  [attr-defined]

@srittau
Copy link
Collaborator

srittau commented Jul 25, 2024

Thanks for your contribution!

Since redis ships a py.typed file starting with redis 5, types-redis deliberately doesn't support redis 5 and is slated to be removed: #10592. When using redis 5, I suggest to remove types-redis and report any type problems directly to redis-py, so they can be fixed. (And I'm sure they are happy about PRs as well.)

@srittau srittau closed this Jul 25, 2024
@patrick91 patrick91 deleted the patch-1 branch July 25, 2024 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants