You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure that __init__ method signature of interfaces inheriting from BrokerInterface contains a positional arg for the broker url.
Ptich
Interfaces inheriting from BrokerInterface now have different __init__ signatures. We should at least make sure that they accept a positional parameter for the broker url.
That will also improve the _init_broker method used by WebSocketManager.
We could then accept *args, **kwargs for user convenience:
# ./_broker.pyclassBrokerInterface(ABC):
@abstractmethoddef__init__(broker_url: str, *args, **kwargs):
...
# Also `InMemoryBroker` and `RedisBroker`# should be updated to match that# ./manager.py# this require also `create_broker` signature to# be updated to match `*args`.def_init_broker(url: str, broker_class: Any|None=None, *args, **kwargs) ->BrokerT:
ifbroker_class:
assertis_valid_broker(
broker_class
), 'Invalid broker class. Use distributed_websocket.utils.is_valid_broker to check if your broker_class is valid.'broker_factory=broker_classorcreate_brokerreturnbroker_factory(url, *args, **kwargs)
The text was updated successfully, but these errors were encountered:
Feature or enhancement
Ensure that
__init__
method signature of interfaces inheriting fromBrokerInterface
contains a positional arg for the broker url.Ptich
Interfaces inheriting from
BrokerInterface
now have different__init__
signatures. We should at least make sure that they accept a positional parameter for the broker url.That will also improve the
_init_broker
method used byWebSocketManager
.We could then accept
*args, **kwargs
for user convenience:The text was updated successfully, but these errors were encountered: