Skip to content

Commit

Permalink
fix deprecation warning version
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Nov 2, 2024
1 parent d8359f2 commit cc84d2f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 62 deletions.
62 changes: 32 additions & 30 deletions ovos_core/skill_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,32 +206,6 @@ def _define_message_bus_events(self):
self.bus.on("mycroft.internet.disconnected", self.handle_internet_disconnected)
self.bus.on("mycroft.gui.unavailable", self.handle_gui_disconnected)

@deprecated("mycroft.ready event has moved to finished booting skill", "0.1.0")
def is_device_ready(self):
"""Check if the device is ready by waiting for various services to start.
Returns:
bool: True if the device is ready, False otherwise.
Raises:
TimeoutError: If the device is not ready within a specified timeout.
"""
return True

@deprecated("mycroft.ready event has moved to finished booting skill", "0.1.0")
def handle_check_device_readiness(self, message):
pass

@deprecated("mycroft.ready event has moved to finished booting skill", "0.1.0")
def check_services_ready(self, services):
"""Report if all specified services are ready.
Args:
services (iterable): Service names to check.
Returns:
bool: True if all specified services are ready, False otherwise.
"""
return True

@property
def skills_config(self):
"""Get the skills service configuration.
Expand Down Expand Up @@ -389,10 +363,6 @@ def _load_plugin_skill(self, skill_id, skill_plugin):

return skill_loader if load_status else None

@deprecated("priority skills have been deprecated for a long time", "0.1.0")
def load_priority(self):
pass

def run(self):
"""Run the skill manager thread."""
self.status.set_alive()
Expand Down Expand Up @@ -742,3 +712,35 @@ def stop(self):

if self._settings_watchdog:
self._settings_watchdog.shutdown()

############
# Deprecated stuff
@deprecated("priority skills have been deprecated for a long time", "1.0.0")
def load_priority(self):
pass

@deprecated("mycroft.ready event has moved to finished booting skill", "1.0.0")
def is_device_ready(self):
"""Check if the device is ready by waiting for various services to start.
Returns:
bool: True if the device is ready, False otherwise.
Raises:
TimeoutError: If the device is not ready within a specified timeout.
"""
return True

@deprecated("mycroft.ready event has moved to finished booting skill", "1.0.0")
def handle_check_device_readiness(self, message):
pass

@deprecated("mycroft.ready event has moved to finished booting skill", "1.0.0")
def check_services_ready(self, services):
"""Report if all specified services are ready.
Args:
services (iterable): Service names to check.
Returns:
bool: True if all specified services are ready, False otherwise.
"""
return True
32 changes: 0 additions & 32 deletions test/unittests/test_intent_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,40 +26,8 @@
BASE_CONF = deepcopy(LocalConf(DEFAULT_CONFIG))
BASE_CONF['lang'] = 'it-it'

NO_LANG_CONF = deepcopy(LocalConf(DEFAULT_CONFIG))
NO_LANG_CONF.pop('lang')

setup_locale("en-US")


class MockEmitter(object):
def __init__(self):
self.reset()

def emit(self, message):
self.types.append(message.msg_type)
self.results.append(message.data)

def get_types(self):
return self.types

def get_results(self):
return self.results

def remove(self, msg_type, handler):
self.removed.append(msg_type)

def on(self, msg_type, handler):
pass

def reset(self):
self.removed = []
self.types = []
self.results = []


class ContextManagerTest(TestCase):
emitter = MockEmitter()

def setUp(self):
self.context_manager = ContextManager(3)
Expand Down

0 comments on commit cc84d2f

Please sign in to comment.