forked from platypush/platypush
[Python compatibility] Removed @classmethod @property
usages.
The construct is no longer supported in Python 3.13.
This commit is contained in:
parent
f31ccc6f57
commit
3f3ae86993
1 changed files with 3 additions and 4 deletions
|
@ -11,20 +11,19 @@ class WSEventProxy(WSRoute):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*args, subscriptions=[self.events_channel], **kwargs)
|
super().__init__(*args, subscriptions=[self._get_events_channel()], **kwargs)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def app_name(cls) -> str:
|
def app_name(cls) -> str:
|
||||||
return 'events'
|
return 'events'
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@property
|
def _get_events_channel(cls) -> str:
|
||||||
def events_channel(cls) -> str:
|
|
||||||
return cls.get_channel('events')
|
return cls.get_channel('events')
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def publish(cls, data: MessageType, *_) -> None:
|
def publish(cls, data: MessageType, *_) -> None:
|
||||||
super().publish(data, cls.events_channel)
|
super().publish(data, cls._get_events_channel())
|
||||||
|
|
||||||
def on_message(self, message):
|
def on_message(self, message):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue