Skip to content

Commit 9dfa0df

Browse files
committed
Tanker: deprecate device_id and get_device_list
1 parent 8897fa7 commit 9dfa0df

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tankersdk/tanker.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import asyncio
22
import os
3+
import warnings
34
import weakref
45
from enum import Enum
56
from typing import Any, List, Optional, cast
@@ -820,6 +821,11 @@ async def decrypt_stream(self, encrypted_stream: Stream) -> Stream:
820821

821822
async def device_id(self) -> str:
822823
""":return: the current device id"""
824+
warnings.warn(
825+
'The "device_id" method is deprecated, it will be removed in the future',
826+
DeprecationWarning,
827+
)
828+
823829
c_future = tankerlib.tanker_device_id(self.c_tanker)
824830
c_voidp = await ffihelpers.handle_tanker_future(c_future)
825831
c_str = ffi.cast("char*", c_voidp)
@@ -832,6 +838,11 @@ async def get_device_list(self) -> List[Device]:
832838
833839
:returns: a list of :py:class`Device` instances
834840
"""
841+
warnings.warn(
842+
'The "get_device_list" method is deprecated, it will be removed in the future',
843+
DeprecationWarning,
844+
)
845+
835846
c_future = tankerlib.tanker_get_device_list(self.c_tanker)
836847
c_voidp = await ffihelpers.handle_tanker_future(c_future)
837848
c_list = ffi.cast("tanker_device_list_t*", c_voidp)

0 commit comments

Comments
 (0)