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:
@@ -14,19 +14,19 @@ datastore trio (`redis` / `psql` / `mysql`), a sibling of the `mongo` lib.
|
||||
`requirements.txt`:
|
||||
|
||||
```
|
||||
redis_store @ git+ssh://git@git.rethinkstudios.io/rethink-public/redis.git@v0.1.1
|
||||
redis_store @ git+ssh://git@git.rethinkstudios.io/rethink-public/redis.git@v0.1.2
|
||||
```
|
||||
|
||||
Direct:
|
||||
|
||||
```bash
|
||||
pip install "redis_store @ git+ssh://git@git.rethinkstudios.io/rethink-public/redis.git@v0.1.1"
|
||||
pip install "redis_store @ git+ssh://git@git.rethinkstudios.io/rethink-public/redis.git@v0.1.2"
|
||||
```
|
||||
|
||||
Pulls `redis>=5` (redis-py, which ships the asyncio client — **not** the dead standalone
|
||||
`aioredis`).
|
||||
|
||||
Drop the `@v0.1.1` suffix from the line above to install the latest unpinned.
|
||||
Drop the `@v0.1.2` suffix from the line above to install the latest unpinned.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -62,6 +62,10 @@ One client/pool per process — build it once, attach it to your app (`app.kv =
|
||||
`None` for an absent key). Pass `decode_responses=False` at construction for raw `bytes`.
|
||||
Counters and counts (`incr`/`decr`/`exists`/`ttl`) always return `int` regardless.
|
||||
|
||||
Pool sizing/timeout are `max_connections=` and `pool_timeout=` (how long a caller waits for
|
||||
a free connection when the pool is saturated). Pass the driver's own `timeout=` in
|
||||
`pool_kwargs` and construction raises a clear `ValueError` — use `pool_timeout=`.
|
||||
|
||||
## Error contract — fail loud
|
||||
|
||||
Unlike the `mongo` lib (which log-and-swallows, returning a safe default), **this lib
|
||||
|
||||
Reference in New Issue
Block a user