File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 1
1
import asyncio
2
2
import os
3
+ import warnings
3
4
import weakref
4
5
from enum import Enum
5
6
from typing import Any , List , Optional , cast
@@ -820,6 +821,11 @@ async def decrypt_stream(self, encrypted_stream: Stream) -> Stream:
820
821
821
822
async def device_id (self ) -> str :
822
823
""":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
+
823
829
c_future = tankerlib .tanker_device_id (self .c_tanker )
824
830
c_voidp = await ffihelpers .handle_tanker_future (c_future )
825
831
c_str = ffi .cast ("char*" , c_voidp )
@@ -832,6 +838,11 @@ async def get_device_list(self) -> List[Device]:
832
838
833
839
:returns: a list of :py:class`Device` instances
834
840
"""
841
+ warnings .warn (
842
+ 'The "get_device_list" method is deprecated, it will be removed in the future' ,
843
+ DeprecationWarning ,
844
+ )
845
+
835
846
c_future = tankerlib .tanker_get_device_list (self .c_tanker )
836
847
c_voidp = await ffihelpers .handle_tanker_future (c_future )
837
848
c_list = ffi .cast ("tanker_device_list_t*" , c_voidp )
You can’t perform that action at this time.
0 commit comments