redis-py icon indicating copy to clipboard operation
redis-py copied to clipboard

BlockingConnectionPool timeout required to be an integer?

Open dave-shawley opened this issue 6 months ago • 0 comments

Version: What redis-py and what redis version is the issue happening on? redis-py 5.0.8, redis version is N/A

Platform: What platform / version? (For example Python 3.5.1 on Windows 7 / Ubuntu 15.10 / Azure) Python 3.12 on macOS

Description:

The timeout parameter to the BlockingConnectionPool initializer is type annotated as an integer. I believe that it should be a float | int to allow for sub-second timeouts. This caught my eye when code-reviewing a co-worker's code where he was explicitly rounding our float values. I wanted to make sure that I'm not missing something where this is required to be an integer number of seconds.

dave-shawley avatar Aug 13 '24 20:08 dave-shawley