diff options
author | Alex Grönholm <alex.gronholm@nextday.fi> | 2022-01-02 00:49:20 +0200 |
---|---|---|
committer | Alex Grönholm <alex.gronholm@nextday.fi> | 2022-01-02 00:50:29 +0200 |
commit | 6ae2c5bd5d44ca0d1e6aea1d4f4c3dc55b5efb8a (patch) | |
tree | 3797c4c39e6992c627d039becb431e4e74e6954d | |
parent | 46076956fed73635ee05db51f9116096039e9cde (diff) | |
download | apscheduler-6ae2c5bd5d44ca0d1e6aea1d4f4c3dc55b5efb8a.tar.gz |
Upgraded redis dependency
-rw-r--r-- | setup.cfg | 4 | ||||
-rw-r--r-- | src/apscheduler/eventbrokers/redis.py | 6 |
2 files changed, 4 insertions, 6 deletions
@@ -37,7 +37,7 @@ asyncpg = asyncpg >= 0.20 cbor = cbor2 >= 5.0 mongodb = pymongo >= 3.12 mqtt = paho-mqtt >= 1.5 -redis = redis >= 3.5 +redis = redis >= 4.0 sqlalchemy = sqlalchemy >= 1.4.22 test = asyncpg >= 0.20 @@ -53,7 +53,7 @@ test = pytest-freezegun pytest-lazy-fixture pytest-mock - redis >= 3.5 + redis[hiredis] >= 4.0 sqlalchemy >= 1.4.22 trio doc = diff --git a/src/apscheduler/eventbrokers/redis.py b/src/apscheduler/eventbrokers/redis.py index eae5678..5211181 100644 --- a/src/apscheduler/eventbrokers/redis.py +++ b/src/apscheduler/eventbrokers/redis.py @@ -2,7 +2,6 @@ from __future__ import annotations from concurrent.futures import Future from threading import Thread -from typing import Optional import attrs from redis import ConnectionPool, Redis @@ -26,9 +25,8 @@ class RedisEventBroker(LocalEventBroker, DistributedEventBrokerMixin): _ready_future: Future[None] = attrs.field(init=False) @classmethod - def from_url(cls, url: str, db: Optional[str] = None, decode_components: bool = False, - **kwargs) -> RedisEventBroker: - pool = ConnectionPool.from_url(url, db, decode_components, **kwargs) + def from_url(cls, url: str, **kwargs) -> RedisEventBroker: + pool = ConnectionPool.from_url(url, **kwargs) client = Redis(connection_pool=pool) return cls(client) |