diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/architecture.py | 10 | ||||
| -rw-r--r-- | python/binaryview.py | 54 | ||||
| -rw-r--r-- | python/deprecation.py | 11 | ||||
| -rw-r--r-- | python/enterprise.py | 2 | ||||
| -rw-r--r-- | python/function.py | 70 | ||||
| -rw-r--r-- | python/highlevelil.py | 2 |
6 files changed, 71 insertions, 78 deletions
diff --git a/python/architecture.py b/python/architecture.py index 60731eee..9c5cb64d 100644 --- a/python/architecture.py +++ b/python/architecture.py @@ -39,6 +39,7 @@ from . import callingconvention from . import typelibrary from . import function from . import binaryview +from . import deprecation RegisterIndex = NewType('RegisterIndex', int) RegisterStackIndex = NewType('RegisterStackIndex', int) @@ -1965,10 +1966,9 @@ class Architecture(metaclass=_ArchitectureMetaClass): """ return NotImplemented + @deprecation.deprecated(deprecated_in="3.1.3724") def is_view_type_constant_defined(self, type_name: str, const_name: str) -> bool: """ - This API is deprecated and should not be used anymore. - :param str type_name: the BinaryView type name of the constant to query :param str const_name: the constant name to query :rtype: None @@ -1984,10 +1984,9 @@ class Architecture(metaclass=_ArchitectureMetaClass): """ return False + @deprecation.deprecated(deprecated_in="3.1.3724") def get_view_type_constant(self, type_name: str, const_name: str, default_value: int = 0) -> int: """ - This API is deprecated and should not be used anymore. - ``get_view_type_constant`` retrieves the view type constant for the given type_name and const_name. :param str type_name: the BinaryView type name of the constant to be retrieved @@ -2006,10 +2005,9 @@ class Architecture(metaclass=_ArchitectureMetaClass): """ return 0 + @deprecation.deprecated(deprecated_in="3.1.3724") def set_view_type_constant(self, type_name: str, const_name: str, value: int) -> None: """ - This API is deprecated and should not be used anymore. - ``set_view_type_constant`` creates a new binaryview type constant. :param str type_name: the BinaryView type name of the constant to be registered diff --git a/python/binaryview.py b/python/binaryview.py index 250bd8fe..c2374aa5 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -1337,7 +1337,7 @@ class Segment: x = "x" if self.executable else "-" return f"<segment: {self.start:#x}-{self.end:#x}, {r}{w}{x}>" - @deprecation.deprecated(details="Use .length instead. Python disallows the length of an object to " + @deprecation.deprecated(deprecated_in="3.4.3997", details="Use .length instead. Python disallows the length of an object to " ">= 0x8000000000000000. See https://bugs.python.org/issue21444.") def __len__(self): return self.length @@ -1443,7 +1443,7 @@ class Section: def __repr__(self): return f"<section {self.name}: {self.start:#x}-{self.end:#x}>" - @deprecation.deprecated(details="Use .length instead. Python disallows the length of an object to " + @deprecation.deprecated(deprecated_in="3.4.3997", details="Use .length instead. Python disallows the length of an object to " ">= 0x8000000000000000. See https://bugs.python.org/issue21444.") def __len__(self): return self.length @@ -2077,7 +2077,7 @@ class BinaryView: return f"<BinaryView: '{filename}', {size}>" return f"<BinaryView: {size}>" - @deprecation.deprecated(details="Use .length instead. Python disallows the length of an object to " + @deprecation.deprecated(deprecated_in="3.4.3997", details="Use .length instead. Python disallows the length of an object to " ">= 0x8000000000000000. See https://bugs.python.org/issue21444.") def __len__(self): return int(core.BNGetViewLength(self.handle)) @@ -5383,29 +5383,29 @@ class BinaryView: core.BNAddTag(self.handle, tag.handle, user) core.BNAddUserDataTag(self.handle, addr, tag.handle) - @deprecation.deprecated(details='get_tag_type_by_name is deprecated; use get_tag_type instead') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_tag_type instead') def get_tag_type_by_name(self, name: str) -> Optional['TagType']: tag_type = core.BNGetTagType(self.handle, name) if tag_type is None: return None return TagType(tag_type) - @deprecation.deprecated(details='get_tag_type_by_id is deprecated; use get_tag_type instead') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_tag_type instead') def get_tag_type_by_id(self, id: str) -> Optional['TagType']: tag_type = core.BNGetTagTypeById(self.handle, id) if tag_type is None: return None return TagType(tag_type) - @deprecation.deprecated(details='create_user_tag is deprecated; use add_tag instead') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use add_tag instead') def create_user_tag(self, type: 'TagType', data: str) -> 'Tag': return self.create_tag(type, data, True) - @deprecation.deprecated(details='create_auto_tag is deprecated; use add_tag instead') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use add_tag instead') def create_auto_tag(self, type: 'TagType', data: str) -> 'Tag': return self.create_tag(type, data, False) - @deprecation.deprecated(details='create_tag is deprecated; use add_tag instead') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use add_tag instead') def create_tag(self, tag_type: 'TagType', data: str, user: bool = True) -> 'Tag': if not isinstance(tag_type, TagType): raise ValueError(f"type is not a TagType instead got {type(tag_type)} : {repr(tag_type)}") @@ -5415,7 +5415,7 @@ class BinaryView: core.BNAddTag(self.handle, tag.handle, user) return tag - @deprecation.deprecated(details='get_tag is deprecated') + @deprecation.deprecated(deprecated_in="3.4.4146") def get_tag(self, id: str) -> Optional['Tag']: tag = core.BNGetTag(self.handle, id) if tag is None: @@ -5463,12 +5463,12 @@ class BinaryView: core.BNFreeTagReferences(tags, count.value) @property - @deprecation.deprecated(details='data_tags is deprecated; use tags instead') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use tags instead') def data_tags(self) -> List[Tuple[int, 'Tag']]: return self.tags @property - @deprecation.deprecated(details='auto_data_tags is deprecated; use get_tags instead') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_tags instead') def auto_data_tags(self) -> List[Tuple[int, 'Tag']]: count = ctypes.c_ulonglong() tags = core.BNGetAutoDataTagReferences(self.handle, count) @@ -5487,7 +5487,7 @@ class BinaryView: core.BNFreeTagReferences(tags, count.value) @property - @deprecation.deprecated(details='user_data_tags is deprecated; use get_tags instead') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_tags instead') def user_data_tags(self) -> List[Tuple[int, 'Tag']]: count = ctypes.c_ulonglong() refs = core.BNGetUserDataTagReferences(self.handle, count) @@ -5535,19 +5535,19 @@ class BinaryView: finally: core.BNFreeTagList(tags, count.value) - @deprecation.deprecated(details='get_data_tags_at is deprecated; use get_tags_at instead') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_tags_at instead') def get_data_tags_at(self, addr: int, auto: Optional[bool] = None) -> List['Tag']: return self.get_tags_at(addr, auto) - @deprecation.deprecated(details='get_auto_data_tags_at is deprecated; use get_tags_at instead') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_tags_at instead') def get_auto_data_tags_at(self, addr: int) -> List['Tag']: return self.get_tags_at(addr, True) - @deprecation.deprecated(details='get_user_data_tags_at is deprecated; use get_tags_at instead') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_tags_at instead') def get_user_data_tags_at(self, addr: int) -> List['Tag']: return self.get_tags_at(addr, False) - @deprecation.deprecated(details='get_data_tags_of_type is deprecated; use get_tags_at instead') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_tags_at instead') def get_data_tags_of_type(self, addr: int, tag_type: str, auto: Optional[bool] = None) -> List['Tag']: count = ctypes.c_ulonglong() @@ -5575,7 +5575,7 @@ class BinaryView: finally: core.BNFreeTagList(tags, count.value) - @deprecation.deprecated(details='get_auto_data_tags_of_type is deprecated; use get_tags_at instead') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_tags_at instead') def get_auto_data_tags_of_type(self, addr: int, tag_type: 'TagType') -> List['Tag']: count = ctypes.c_ulonglong() tags = core.BNGetAutoDataTagsOfType(self.handle, addr, tag_type.handle, count) @@ -5590,7 +5590,7 @@ class BinaryView: finally: core.BNFreeTagList(tags, count.value) - @deprecation.deprecated(details='get_user_data_tags_of_type is deprecated; use get_tags_at instead') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_tags_at instead') def get_user_data_tags_of_type(self, addr: int, tag_type: 'TagType') -> List['Tag']: count = ctypes.c_ulonglong() tags = core.BNGetUserDataTagsOfType(self.handle, addr, tag_type.handle, count) @@ -5637,23 +5637,23 @@ class BinaryView: finally: core.BNFreeTagReferences(refs, count.value) - @deprecation.deprecated(details='get_data_tags_in_range is deprecated; use get_tags_in_range instead') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_tags_in_range instead') def get_data_tags_in_range(self, address_range: 'variable.AddressRange', user: Optional[bool] = None) -> List[Tuple[int, 'Tag']]: return self.get_tags_in_range(address_range, user) - @deprecation.deprecated(details='get_auto_data_tags_in_range is deprecated; use get_tags_in_range instead') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_tags_in_range instead') def get_auto_data_tags_in_range(self, address_range: 'variable.AddressRange') -> List[Tuple[int, 'Tag']]: return self.get_tags_in_range(address_range, True) - @deprecation.deprecated(details='get_user_data_tags_in_range is deprecated; use get_tags_in_range instead') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_tags_in_range instead') def get_user_data_tags_in_range(self, address_range: 'variable.AddressRange') -> List[Tuple[int, 'Tag']]: return self.get_tags_in_range(address_range, False) - @deprecation.deprecated(details='add_user_data_tag is deprecated; use add_tag instead') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use add_tag instead') def add_user_data_tag(self, addr: int, tag: 'Tag'): core.BNAddUserDataTag(self.handle, addr, tag.handle) - @deprecation.deprecated(details='create_user_data_tag is deprecated; use add_tag instead') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use add_tag instead') def create_user_data_tag(self, addr: int, type: 'TagType', data: str, unique: bool = False) -> 'Tag': if unique: tags = self.get_data_tags_at(addr) @@ -5689,11 +5689,11 @@ class BinaryView: if tag_type is not None: core.BNRemoveUserDataTagsOfType(self.handle, addr, tag_type.handle) - @deprecation.deprecated(details='add_auto_data_tag is deprecated; use add_tag instead') + @deprecation.deprecated(deprecated_in="3.4.4146", details='use add_tag instead') def add_auto_data_tag(self, addr: int, tag: 'Tag'): core.BNAddAutoDataTag(self.handle, addr, tag.handle) - @deprecation.deprecated(details='create_auto_data_tag is deprecated; use add_tag instead') + @deprecation.deprecated(deprecated_in="3.4.4146", details='use add_tag instead') def create_auto_data_tag(self, addr: int, type: 'TagType', data: str, unique: bool = False) -> 'Tag': if unique: tags = self.get_data_tags_at(addr) @@ -8868,7 +8868,7 @@ class StructuredDataValue(object): value: bytes endian: Endianness - @deprecation.deprecated(details='StructuredDataValue is deprecated.') + @deprecation.deprecated(deprecated_in="3.4.3997") def __init__(self, t: '_type.Type', addr: int, val: bytes, e: Endianness): self.type = t self.address = addr @@ -8928,7 +8928,7 @@ class StructuredDataView(object): >>> """ - @deprecation.deprecated(details='StructuredDataView is deprecated. Use TypedDataAccessor or DataVariable.value instead.') + @deprecation.deprecated(deprecated_in="3.4.3997", details='Use TypedDataAccessor or DataVariable.value instead.') def __init__(self, bv: 'BinaryView', structure_name: '_types.QualifiedNameType', address: int): self._bv = bv self._structure_name = structure_name diff --git a/python/deprecation.py b/python/deprecation.py index f87be905..a97e2101 100644 --- a/python/deprecation.py +++ b/python/deprecation.py @@ -112,7 +112,7 @@ class UnsupportedWarning(DeprecatedWarning): "%(details)s" % (parts)) -def deprecated(deprecated_in=None, removed_in=None, current_version=None, +def deprecated(deprecated_in: str, removed_in=None, current_version=None, details=""): """Decorate a function to signify its deprecation @@ -130,16 +130,11 @@ def deprecated(deprecated_in=None, removed_in=None, current_version=None, :param deprecated_in: The version at which the decorated method is considered deprecated. This will usually be the next version to be released when the decorator is - added. The default is **None**, which effectively - means immediate deprecation. If this is not - specified, then the `removed_in` and - `current_version` arguments are ignored. + added. :param removed_in: The version or :class:`datetime.date` when the decorated method will be removed. The default is **None**, specifying that the function is not currently planned to be removed. - Note: This parameter cannot be set to a value if - `deprecated_in=None`. :param current_version: The source of version information for the currently running code. This will usually be a `__version__` attribute on your library. @@ -208,7 +203,7 @@ def deprecated(deprecated_in=None, removed_in=None, current_version=None, # If removed_in is a version, use "removed in" parts = { "deprecated_in": - " %s" % deprecated_in if deprecated_in else "", + " %s" % deprecated_in if deprecated_in else "<unknown>", "removed_in": "\n This will be removed {} {}.".format("on" if isinstance(removed_in, date) else "in", removed_in) if removed_in else "", diff --git a/python/enterprise.py b/python/enterprise.py index c6c047c3..7d4cc4aa 100644 --- a/python/enterprise.py +++ b/python/enterprise.py @@ -234,7 +234,7 @@ def update_license(duration, _cache=True): if not core.BNUpdateEnterpriseServerLicense(duration): raise RuntimeError(last_error()) -@deprecation.deprecated(details="Use .update_license instead.") +@deprecation.deprecated(deprecated_in="3.4.4137", details="Use .update_license instead.") def acquire_license(duration, _cache=True): """ Function deprecated. Use update_license instead. diff --git a/python/function.py b/python/function.py index bb4a9b2a..e356af65 100644 --- a/python/function.py +++ b/python/function.py @@ -546,7 +546,7 @@ class Function: core.BNSetUserFunctionCanReturn(self.handle, bc) @property - @deprecation.deprecated(details="Use Function.has_explicitly_defined_type instead.") + @deprecation.deprecated(deprecated_in="3.4.4049", details="Use Function.has_explicitly_defined_type instead.") def explicitly_defined_type(self) -> bool: """Whether function has explicitly defined types (read-only)""" return self.has_explicitly_defined_type @@ -770,24 +770,24 @@ class Function: else: core.BNAddUserAddressTag(self.handle, arch.handle, addr, tag.handle) - @deprecation.deprecated(details='Use add_tag instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use add_tag instead.') def create_user_tag(self, type: 'binaryview.TagType', data: str = "") -> 'binaryview.Tag': return self.create_tag(type, data, True) - @deprecation.deprecated(details='Use add_tag instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use add_tag instead.') def create_auto_tag(self, type: 'binaryview.TagType', data: str = "") -> 'binaryview.Tag': return self.create_tag(type, data, False) - @deprecation.deprecated(details='Use add_tag instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use add_tag instead.') def create_tag(self, type: 'binaryview.TagType', data: str = "", auto: bool = False) -> 'binaryview.Tag': return self.view.create_tag(type, data, auto) @property - @deprecation.deprecated(details='Use tags instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use tags instead.') def address_tags(self) -> TagList: return TagList(self) - @deprecation.deprecated(details='Use get_tags_at instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_tags_at instead.') def get_address_tags_at(self, addr: int, arch: Optional['architecture.Architecture'] = None) -> List['binaryview.Tag']: if arch is None: @@ -805,7 +805,7 @@ class Function: finally: core.BNFreeTagList(tags, count.value) - @deprecation.deprecated(details='Use add_tag instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use add_tag instead.') def add_user_address_tag( self, addr: int, tag: 'binaryview.Tag', arch: Optional['architecture.Architecture'] = None ) -> None: @@ -813,7 +813,7 @@ class Function: arch = self.arch core.BNAddUserAddressTag(self.handle, arch.handle, addr, tag.handle) - @deprecation.deprecated(details='Use add_tag instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use add_tag instead.') def create_user_address_tag( self, addr: int, tag_type: 'binaryview.TagType', data: str, unique: bool = False, arch: Optional['architecture.Architecture'] = None @@ -848,7 +848,7 @@ class Function: arch = self.arch core.BNRemoveUserAddressTag(self.handle, arch.handle, addr, tag.handle) - @deprecation.deprecated(details='Use add_tag instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use add_tag instead.') def add_auto_address_tag( self, addr: int, tag: 'binaryview.Tag', arch: Optional['architecture.Architecture'] = None ) -> None: @@ -856,7 +856,7 @@ class Function: arch = self.arch core.BNAddAutoAddressTag(self.handle, arch.handle, addr, tag.handle) - @deprecation.deprecated(details='Use add_tag instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use add_tag instead.') def create_auto_address_tag( self, addr: int, type: 'binaryview.TagType', data: str, unique: bool = False, arch: Optional['architecture.Architecture'] = None @@ -874,7 +874,7 @@ class Function: return tag @property - @deprecation.deprecated(details='Use get_function_tags instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_function_tags instead.') def function_tags(self) -> List['binaryview.Tag']: count = ctypes.c_ulonglong() tags = core.BNGetFunctionTags(self.handle, count) @@ -889,11 +889,11 @@ class Function: finally: core.BNFreeTagList(tags, count.value) - @deprecation.deprecated(details='Use add_tag instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use add_tag instead.') def add_user_function_tag(self, tag: 'binaryview.Tag') -> None: core.BNAddUserFunctionTag(self.handle, tag.handle) - @deprecation.deprecated(details='Use add_tag instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use add_tag instead.') def create_user_function_tag(self, type: 'binaryview.TagType', data: str, unique: bool = False) -> 'binaryview.Tag': if unique: for tag in self.function_tags: @@ -914,11 +914,11 @@ class Function: """ core.BNRemoveUserFunctionTag(self.handle, tag.handle) - @deprecation.deprecated(details='Use add_tag instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use add_tag instead.') def add_auto_function_tag(self, tag: 'binaryview.Tag') -> None: core.BNAddAutoFunctionTag(self.handle, tag.handle) - @deprecation.deprecated(details='Use add_tag instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use add_tag instead.') def create_auto_function_tag(self, type: 'binaryview.TagType', data: str, unique: bool = False) -> 'binaryview.Tag': if unique: for tag in self.function_tags: @@ -930,7 +930,7 @@ class Function: return tag @property - @deprecation.deprecated(details='Use tags instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use tags instead.') def auto_address_tags(self) -> List[Tuple['architecture.Architecture', int, 'binaryview.Tag']]: count = ctypes.c_ulonglong() tags = core.BNGetAutoAddressTagReferences(self.handle, count) @@ -948,7 +948,7 @@ class Function: core.BNFreeTagReferences(tags, count.value) @property - @deprecation.deprecated(details='Use tags instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use tags instead.') def user_address_tags(self): count = ctypes.c_ulonglong() tags = core.BNGetUserAddressTagReferences(self.handle, count) @@ -965,7 +965,7 @@ class Function: finally: core.BNFreeTagReferences(tags, count.value) - @deprecation.deprecated(details='Use get_tags_at instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_tags_at instead.') def get_auto_address_tags_at(self, addr, arch=None): if arch is None: assert self.arch is not None, "Can't call get_auto_address_tags_at for function with no architecture specified" @@ -983,7 +983,7 @@ class Function: finally: core.BNFreeTagList(tags, count.value) - @deprecation.deprecated(details='Use get_tags_at instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_tags_at instead.') def get_user_address_tags_at(self, addr, arch=None): if arch is None: assert self.arch is not None, "Can't call get_user_address_tags_at for function with no architecture specified" @@ -1001,7 +1001,7 @@ class Function: finally: core.BNFreeTagList(tags, count.value) - @deprecation.deprecated(details='Use get_tags_at instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_tags_at instead.') def get_address_tags_of_type(self, addr: int, tag_type: 'binaryview.TagType', arch=None): if arch is None: assert self.arch is not None, "Can't call get_address_tags_of_type for function with no architecture specified" @@ -1019,7 +1019,7 @@ class Function: finally: core.BNFreeTagList(tags, count.value) - @deprecation.deprecated(details='Use get_tags_at instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_tags_at instead.') def get_auto_address_tags_of_type( self, addr: int, tag_type: 'binaryview.TagType', arch: Optional['architecture.Architecture'] = None ): @@ -1039,7 +1039,7 @@ class Function: finally: core.BNFreeTagList(tags, count.value) - @deprecation.deprecated(details='Use get_tags_at instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_tags_at instead.') def get_user_address_tags_of_type( self, addr: int, tag_type: 'binaryview.TagType', arch: Optional['architecture.Architecture'] = None ): @@ -1059,7 +1059,7 @@ class Function: finally: core.BNFreeTagList(tags, count.value) - @deprecation.deprecated(details='Use get_tags_in_range instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_tags_in_range instead.') def get_address_tags_in_range( self, address_range: 'variable.AddressRange', arch: Optional['architecture.Architecture'] = None ) -> List[Tuple['architecture.Architecture', int, 'binaryview.Tag']]: @@ -1080,7 +1080,7 @@ class Function: finally: core.BNFreeTagReferences(refs, count.value) - @deprecation.deprecated(details='Use get_tags_in_range instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_tags_in_range instead.') def get_auto_address_tags_in_range( self, address_range: 'variable.AddressRange', arch: Optional['architecture.Architecture'] = None ) -> List[Tuple['architecture.Architecture', int, 'binaryview.Tag']]: @@ -1101,7 +1101,7 @@ class Function: finally: core.BNFreeTagReferences(refs, count.value) - @deprecation.deprecated(details='Use get_tags_in_range instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_tags_in_range instead.') def get_user_address_tags_in_range( self, address_range: 'variable.AddressRange', arch: Optional['architecture.Architecture'] = None ) -> List[Tuple['architecture.Architecture', int, 'binaryview.Tag']]: @@ -1169,7 +1169,7 @@ class Function: core.BNRemoveAutoAddressTagsOfType(self.handle, arch.handle, addr, tag_type.handle) @property - @deprecation.deprecated(details='Use get_function_tags instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_function_tags instead.') def auto_function_tags(self): count = ctypes.c_ulonglong() tags = core.BNGetAutoFunctionTags(self.handle, count) @@ -1183,7 +1183,7 @@ class Function: return result @property - @deprecation.deprecated(details='Use get_function_tags instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_function_tags instead.') def user_function_tags(self): count = ctypes.c_ulonglong() tags = core.BNGetUserFunctionTags(self.handle, count) @@ -1196,7 +1196,7 @@ class Function: core.BNFreeTagList(tags, count.value) return result - @deprecation.deprecated(details='Use get_function_tags instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_function_tags instead.') def get_function_tags_of_type(self, tag_type): count = ctypes.c_ulonglong() tags = core.BNGetFunctionTagsOfType(self.handle, tag_type.handle, count) @@ -1209,7 +1209,7 @@ class Function: core.BNFreeTagList(tags, count.value) return result - @deprecation.deprecated(details='Use get_function_tags instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_function_tags instead.') def get_auto_function_tags_of_type(self, tag_type): count = ctypes.c_ulonglong() tags = core.BNGetAutoFunctionTagsOfType(self.handle, tag_type.handle, count) @@ -1222,7 +1222,7 @@ class Function: core.BNFreeTagList(tags, count.value) return result - @deprecation.deprecated(details='Use get_function_tags instead.') + @deprecation.deprecated(deprecated_in="3.4.4146", details='Use get_function_tags instead.') def get_user_function_tags_of_type(self, tag_type): count = ctypes.c_ulonglong() tags = core.BNGetUserFunctionTagsOfType(self.handle, tag_type.handle, count) @@ -1368,7 +1368,7 @@ class Function: return highlevelil.HighLevelILFunction(self.arch, result, self) @property - @deprecation.deprecated(details="Use .type instead", deprecated_in="3.4", current_version=__version__) + @deprecation.deprecated(deprecated_in="3.4.3997", details="Use .type instead", current_version=__version__) def function_type(self) -> 'types.FunctionType': """ Function type object, can be set with either a string representing the function prototype @@ -1377,7 +1377,7 @@ class Function: return self.type @function_type.setter - @deprecation.deprecated(details="Use .type instead", deprecated_in="3.4", current_version=__version__) + @deprecation.deprecated(deprecated_in="3.4.3997", details="Use .type instead", current_version=__version__) def function_type(self, value: Union['types.FunctionType', str]) -> None: self.type = value @@ -1753,7 +1753,7 @@ class Function: start += i[1] @property - @deprecation.deprecated(details="Use LowLevelIlFunction.instructions instead.") + @deprecation.deprecated(deprecated_in="3.4.3997", details="Use LowLevelIlFunction.instructions instead.") def llil_instructions(self) -> Generator['lowlevelil.LowLevelILInstruction', None, None]: """ .. note:: Use :py:meth:`LowLevelIlFunction.instructions` instead. @@ -1761,7 +1761,7 @@ class Function: return self.llil.instructions @property - @deprecation.deprecated(details="Use MediumLevelIlFunction.instructions instead.") + @deprecation.deprecated(deprecated_in="3.4.3997", details="Use MediumLevelIlFunction.instructions instead.") def mlil_instructions(self) -> Generator['mediumlevelil.MediumLevelILInstruction', None, None]: """ .. note:: Use :py:meth:`MediumLevelIlFunction.instructions` instead. @@ -1862,7 +1862,7 @@ class Function: def get_comment_at(self, addr: int) -> str: return core.BNGetCommentForAddress(self.handle, addr) - @deprecation.deprecated(details="Use Function.set_comment_at instead.") + @deprecation.deprecated(deprecated_in="3.4.3997", details="Use Function.set_comment_at instead.") def set_comment(self, addr: int, comment: str) -> None: """ .. note:: Use :py:meth:`set_comment_at` instead. diff --git a/python/highlevelil.py b/python/highlevelil.py index 0c5e7992..ba8a75ce 100644 --- a/python/highlevelil.py +++ b/python/highlevelil.py @@ -2344,7 +2344,7 @@ class HighLevelILExpr: .. note:: Use ExpressionIndex instead """ - @deprecation.deprecated(details='HighLevelILExpr is deprecated. Use ExpressionIndex instead') + @deprecation.deprecated(deprecated_in="3.4.3997", details='Use ExpressionIndex instead') def __init__(self, index: ExpressionIndex): self._index = index |
