Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions inorbit_edge/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
import logging
import re

from deprecated import deprecated

logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -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)
9 changes: 0 additions & 9 deletions inorbit_edge/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
17 changes: 0 additions & 17 deletions inorbit_edge/tests/test_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# SPDX-License-Identifier: MIT

import asyncio
import warnings

import pytest

Expand Down Expand Up @@ -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()

Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading