diff --git a/inorbit_edge/metrics.py b/inorbit_edge/metrics.py index 3e33c77..e79904b 100644 --- a/inorbit_edge/metrics.py +++ b/inorbit_edge/metrics.py @@ -40,8 +40,6 @@ import logging import re -from deprecated import deprecated - logger = logging.getLogger(__name__) @@ -302,17 +300,3 @@ def sync_wrapper(*args, **kwargs): return sync_wrapper return decorator - - -@deprecated( - version="2.0.2", - reason=("use with_counter_metric(), which now auto-detects async functions"), -) -def with_counter_metric_async(metric): - """Deprecated alias for :func:`with_counter_metric`. - - Prefer ``@with_counter_metric(...)``, which now detects async functions - automatically. - """ - - return with_counter_metric(metric) diff --git a/inorbit_edge/robot.py b/inorbit_edge/robot.py index 1815f53..0f41fa2 100644 --- a/inorbit_edge/robot.py +++ b/inorbit_edge/robot.py @@ -20,7 +20,6 @@ import requests import socks import yaml -from deprecated import deprecated from PIL import Image from inorbit_edge import __version__ as inorbit_edge_version @@ -1847,11 +1846,3 @@ def free_robot_session(self, robot_id): sess = self.get_session(robot_id) sess.disconnect() del self.robot_sessions[robot_id] - - @deprecated( - version="1.7.2", - reason="use RobotSessionFactory.register_command_callback() instead", - ) - def register_command_callback(self, callback): - """Registers a callback to be called when a command is received""" - self.robot_session_factory.register_command_callback(callback) diff --git a/inorbit_edge/tests/test_metrics.py b/inorbit_edge/tests/test_metrics.py index 8f85d8a..004d396 100644 --- a/inorbit_edge/tests/test_metrics.py +++ b/inorbit_edge/tests/test_metrics.py @@ -2,7 +2,6 @@ # SPDX-License-Identifier: MIT import asyncio -import warnings import pytest @@ -80,22 +79,6 @@ def f(): assert counter.calls == [(1, {})] -def test_with_counter_metric_async_alias_emits_deprecation_warning(): - counter = _RecordingCounter() - - with warnings.catch_warnings(record=True) as captured: - warnings.simplefilter("always") - - @edge_metrics.with_counter_metric_async(counter) - async def f(): - return 1 - - asyncio.run(f()) - - assert any(issubclass(w.category, DeprecationWarning) for w in captured) - assert counter.calls == [(1, {})] - - def test_wrapped_function_preserves_name_and_docstring(): counter = _RecordingCounter() diff --git a/requirements.txt b/requirements.txt index 8482288..40359a2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,5 +6,4 @@ pydantic>=2.6,<3.0 pysocks>=1.7,<2.0 protobuf~=5.29.6 certifi>=2024.2 -deprecated>=1.2,<2.0 rdp2~=1.1.2