fix: reject timeout= in pool_kwargs with a clear ValueError (redis-2)

a caller passing the driver-native timeout= (instead of pool_timeout=) would hit a cryptic
'multiple values for timeout' from BlockingConnectionPool. now raise a clear ValueError
pointing at pool_timeout. verified vs real redis. README note added. bump v0.1.1 -> v0.1.2

Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
2026-07-01 00:28:18 -04:00
parent b87e532f80
commit a0e9fc28d6
3 changed files with 17 additions and 4 deletions
+9
View File
@@ -71,7 +71,16 @@ class RedisDB:
max_connections, callers WAIT up to pool_timeout seconds for a free connection
(matching motor/mongo's blocking pool) rather than the plain pool's behavior of
raising MaxConnectionsError immediately. pool_timeout=None waits forever.
`timeout` is the pool's own kwarg (set from pool_timeout here), so passing it in
pool_kwargs would collide — reject it with a clear pointer rather than let the
driver raise a cryptic "multiple values for 'timeout'".
"""
if "timeout" in pool_kwargs:
raise ValueError(
"redis_store: pass the pool wait timeout as pool_timeout=, not timeout= "
"(timeout is filled from pool_timeout)"
)
self._pool = redis.BlockingConnectionPool(
host=host,
port=port,