Skip to content

Commit

Permalink
Revert test change that had no effect
Browse files Browse the repository at this point in the history
Update deprecation warnings in mq_utils
  • Loading branch information
NeonDaniel committed May 21, 2024
1 parent 932a2aa commit 64f993e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 6 additions & 4 deletions neon_utils/mq_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down
4 changes: 0 additions & 4 deletions tests/location_util_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 64f993e

Please sign in to comment.