From 64f993e3bf0de8bc9bfc8831e2a407cc032fe28f Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Tue, 21 May 2024 11:18:44 -0700 Subject: [PATCH] Revert test change that had no effect Update deprecation warnings in mq_utils --- neon_utils/mq_utils.py | 10 ++++++---- tests/location_util_tests.py | 4 ---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/neon_utils/mq_utils.py b/neon_utils/mq_utils.py index 73d874da..08163eb5 100644 --- a/neon_utils/mq_utils.py +++ b/neon_utils/mq_utils.py @@ -29,8 +29,10 @@ import logging import uuid -from ovos_utils.log import deprecated +from ovos_utils.log import deprecated, log_deprecation +log_deprecation("This module has moved to neon_mq_connector.utils.client_utils", + "2.0.0") try: from threading import Event from pika.channel import Channel @@ -60,6 +62,8 @@ class NeonMQHandler(MQConnector): def __init__(self, config: dict, service_name: str, vhost: str): + log_deprecation("Import from neon_mq_connector.utils.client_utils", + "2.0.0") super().__init__(config, service_name) self.vhost = vhost import pika @@ -70,13 +74,11 @@ def __init__(self, config: dict, service_name: str, vhost: str): @deprecated("Use `neon_mq_connector.client.send_mq_request`", "2.0.0") def get_mq_response(vhost: str, request_data: dict, target_queue: str, response_queue: str = None, timeout: int = 30) -> dict: - # TODO: Remove in v1.0.0 DM return send_mq_request(vhost, request_data, target_queue, response_queue, timeout, True) -# TODO: Mark deprecation after stable neon_mq_connector release -# @deprecated("Use `neon_mq_connector.client.send_mq_request`", "2.0.0") +@deprecated("Import from neon_mq_connector.utils.client_utils", "2.0.0") def send_mq_request(vhost: str, request_data: dict, target_queue: str, response_queue: str = None, timeout: int = 30, expect_response: bool = True) -> dict: diff --git a/tests/location_util_tests.py b/tests/location_util_tests.py index 0ae2fddf..954948b6 100644 --- a/tests/location_util_tests.py +++ b/tests/location_util_tests.py @@ -35,10 +35,6 @@ class LocationUtilTests(unittest.TestCase): - def setUp(self): - from neon_utils.hana_utils import set_default_backend_url - set_default_backend_url('https://hana.neonaialpha.com') - def test_get_coordinates_complete(self): from neon_utils.location_utils import get_coordinates