Skip to content

Commit

Permalink
deprecation logs
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Dec 29, 2023
1 parent 024be84 commit 34a6e4a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
8 changes: 5 additions & 3 deletions ovos_utils/intents/converse.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

import ovos_utils.messagebus
from ovos_utils.intents.intent_service_interface import IntentQueryApi
from ovos_utils.log import LOG, log_deprecation

log_deprecation("ConverseTracker has been deprecated without replacement", "0.1.0")
from ovos_utils.log import LOG, deprecated


class ConverseTracker:
Expand All @@ -20,6 +18,10 @@ class ConverseTracker:
last_conversed = None
intent_api = None

@deprecated("ConverseTracker has been deprecated without replacement", "0.1.0")
def __init__(self):
pass

@classmethod
def connect_bus(cls, mycroft_bus):
"""Registers the bus object to use."""
Expand Down
4 changes: 2 additions & 2 deletions ovos_utils/intents/intent_service_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import List, Tuple, Optional

import ovos_utils.messagebus
from ovos_utils.log import LOG, log_deprecation
from ovos_utils.log import LOG, log_deprecation, deprecated

from ovos_utils.file_utils import to_alnum # backwards compat import

Expand Down Expand Up @@ -373,8 +373,8 @@ class IntentQueryApi:
Query Intent Service at runtime
"""

@deprecated("IntentQueryApi has been deprecated without replacement", "0.1.0")
def __init__(self, bus=None, timeout=5):
LOG.warning("IntentQueryApi has been deprecated and will be removed in 0.1.0")
if bus is None:
bus = ovos_utils.messagebus.get_mycroft_bus()
self.bus = bus
Expand Down
7 changes: 3 additions & 4 deletions ovos_utils/intents/layers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from ovos_utils.log import LOG, log_deprecation
from ovos_utils.log import LOG, deprecated

log_deprecation("IntentLayers moved to ovos_workshop.decorators.layers", "0.1.0")

try:
from ovos_workshop.decorators.layers import IntentLayers
Expand All @@ -10,9 +9,9 @@
from time import sleep

class IntentLayers:

@deprecated("IntentLayers moved to ovos_workshop.decorators.layers", "0.1.0")
def __init__(self, bus=None, layers=None):
# TODO: Deprecate in 0.1.0
LOG.error(f"This module is deprecated, import from `ovos_workshop.skills.layers")
layers = layers or []
self.bus = bus or ovos_utils.messagebus.get_mycroft_bus()
# make intent levels for N layers
Expand Down

0 comments on commit 34a6e4a

Please sign in to comment.