Skip to content

Commit

Permalink
fix: this time fix compat for realz
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl authored Nov 21, 2024
1 parent fef2160 commit 6407d97
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions ovos_utils/fakebus.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
from copy import deepcopy
from threading import Event

from pyee import EventEmitter

from ovos_utils.log import LOG, log_deprecation
from pyee import EventEmitter


def dig_for_message():
Expand Down Expand Up @@ -188,7 +187,6 @@ def __new__(cls, *args, **kwargs):
pass
return super().__new__(cls)


def __init__(self, msg_type, data=None, context=None):
"""Used to construct a message object
Expand Down Expand Up @@ -332,8 +330,9 @@ def publish(self, msg_type, data, context=None):


class Message(FakeMessage):
"""just for compat, stuff in the wild importing from here even with deprecation warnings..."""
def __new__(cls, *args, **kwargs):
log_deprecation("please import from ovos-bus-client directly! this import has been deprecated since version 0.1.0", "1.0.0")
return super().__new__(cls)

"""just for compat, stuff in the wild importing from here even with deprecation warnings..."""

def __new__(cls, *args, **kwargs):
log_deprecation(
"please import from ovos-bus-client directly! this import has been deprecated since version 0.1.0", "1.0.0")
return FakeMessage(*args, **kwargs)

0 comments on commit 6407d97

Please sign in to comment.