Skip to content

Commit 04e5e06

Browse files
committed
use deprecated module
1 parent 12c063e commit 04e5e06

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

livekit-rtc/livekit/rtc/participant.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import weakref
2222
from typing import List, Union, Callable, Dict, Awaitable, Optional, Mapping, TYPE_CHECKING
2323
from abc import abstractmethod, ABC
24+
from deprecated import deprecated
2425

2526
from ._ffi_client import FfiClient, FfiHandle
2627
from ._proto import ffi_pb2 as proto_ffi
@@ -329,6 +330,7 @@ async def perform_rpc(
329330

330331
return cb.perform_rpc.payload
331332

333+
@deprecated(reason="Use room.register_rpc_method instead.")
332334
def register_rpc_method(
333335
self,
334336
method_name: str,
@@ -376,6 +378,7 @@ async def greet_handler(data: RpcInvocationData) -> str:
376378
return room.register_rpc_method(method_name, handler)
377379
return None
378380

381+
@deprecated(reason="Use room.unregister_rpc_method instead.")
379382
def unregister_rpc_method(self, method: str) -> None:
380383
"""
381384
Deprecated

livekit-rtc/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def finalize_options(self):
5858
license="Apache-2.0",
5959
packages=setuptools.find_namespace_packages(include=["livekit.*"]),
6060
python_requires=">=3.9.0",
61-
install_requires=["protobuf>=5.26.1", "types-protobuf>=3", "aiofiles>=24"],
61+
install_requires=["protobuf>=5.26.1", "types-protobuf>=3", "aiofiles>=24", "deprecated>=1.2.18"],
6262
package_data={
6363
"livekit.rtc": ["_proto/*.py", "py.typed", "*.pyi", "**/*.pyi"],
6464
"livekit.rtc.resources": ["*.so", "*.dylib", "*.dll", "LICENSE.md", "*.h"],

0 commit comments

Comments
 (0)