[Python compatibility] Removed @classmethod @property usages.

The construct is no longer supported in Python 3.13.
This commit is contained in:
Fabio Manganiello 2024-12-25 23:02:51 +01:00
parent f31ccc6f57
commit 3f3ae86993
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -11,20 +11,19 @@ class WSEventProxy(WSRoute):
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, subscriptions=[self.events_channel], **kwargs)
super().__init__(*args, subscriptions=[self._get_events_channel()], **kwargs)
@classmethod
def app_name(cls) -> str:
return 'events'
@classmethod
@property
def events_channel(cls) -> str:
def _get_events_channel(cls) -> str:
return cls.get_channel('events')
@classmethod
def publish(cls, data: MessageType, *_) -> None:
super().publish(data, cls.events_channel)
super().publish(data, cls._get_events_channel())
def on_message(self, message):
try: