redis / redis-py

Redis Python client
MIT License
12.57k stars 2.51k forks source link

Commands don't implement `CommandsProtocol.connection_pool` #2730

Open Avasam opened 1 year ago

Avasam commented 1 year ago

Version: redis-py 4.5.4

Platform: Any

Description:

The CommandsProtocol protocol at redis/typing.py has a connection_pool member. However, all commands that subclasses the protocol seem to be missing connection_pool in their implementation. This causes issues with type-checking tools expecting the commands to respect the Protocol.

Avasam commented 1 year ago

I could make a PR to fix it, but the problem is that I don't know what was the intention. Is the protocol wrong for wanting connection_pool ? Or are the commands wrong for not implementing it? Is the variable set dynamically later down the line? If so, where, and should connection_pool be potentially None instead of potentially undefined?

github-actions[bot] commented 5 months ago

This issue is marked stale. It will be closed in 30 days if it is not updated.

Avasam commented 5 months ago

Update. I can make a PR for this. I just need an answer first.