Add removal_date to deprecation API

This commit is contained in:
Andrew Case
2025-03-09 22:23:33 -05:00
committed by David McDonald
parent 6cabb0586b
commit 3eae04c1e8
5 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ def deprecated_method(
replacement: Callable,
removal_date: str,
replacement_version: Tuple[int, int, int] = None,
additional_information: str = ""
additional_information: str = "",
):
"""A decorator for marking functions as deprecated.
+1 -1
View File
@@ -41,7 +41,7 @@ class Lsmod(plugins.PluginInterface):
@deprecation.deprecated_method(
replacement=linux_utilities_modules.Modules.list_modules,
replacement_version=(2, 0, 0),
removal_date="2025-09-25"
removal_date="2025-09-25",
)
def list_modules(
cls, context: interfaces.context.ContextInterface, vmlinux_module_name: str
@@ -51,7 +51,7 @@ spot modules presence and taints."""
@deprecation.deprecated_method(
replacement=linux_utilities_modules.Modules.flatten_run_modules_results,
replacement_version=(2, 0, 0),
removal_date="2025-09-25"
removal_date="2025-09-25",
)
def flatten_run_modules_results(
cls, run_results: Dict[str, List[extensions.module]], deduplicate: bool = True
@@ -74,7 +74,7 @@ spot modules presence and taints."""
@deprecation.deprecated_method(
replacement=linux_utilities_modules.Modules.run_modules_scanners,
replacement_version=(2, 0, 0),
removal_date="2025-09-25"
removal_date="2025-09-25",
)
def run_modules_scanners(
cls,
@@ -370,7 +370,7 @@ class LinuxUtilities(interfaces.configuration.VersionableInterface):
@classmethod
@deprecation.method_being_removed(
removal_date="2025-09-25",
message="Callers to this method should adapt `linux_utilities_modules.Modules.run_module_scanners`"
message="Callers to this method should adapt `linux_utilities_modules.Modules.run_module_scanners`",
)
def mask_mods_list(
cls,
@@ -388,7 +388,7 @@ class LinuxUtilities(interfaces.configuration.VersionableInterface):
@classmethod
@deprecation.method_being_removed(
removal_date="2025-09-25",
message="Callers to this method should adapt `linux_utilities_modules.Modules.run_module_scanners`"
message="Callers to this method should adapt `linux_utilities_modules.Modules.run_module_scanners`",
)
def generate_kernel_handler_info(
cls,
@@ -105,7 +105,7 @@ class Modules(interfaces.configuration.VersionableInterface):
@classmethod
@deprecation.method_being_removed(
removal_date="2025-09-25",
message="Code using this function should adapt `linux_utilities_modules.Modules.run_module_scanners`"
message="Code using this function should adapt `linux_utilities_modules.Modules.run_module_scanners`",
)
def mask_mods_list(
cls,
@@ -130,7 +130,7 @@ class Modules(interfaces.configuration.VersionableInterface):
@classmethod
@deprecation.method_being_removed(
removal_date="2025-09-25",
message="Use `module_lookup_by_address` to map address to their hosting kernel module and symbol."
message="Use `module_lookup_by_address` to map address to their hosting kernel module and symbol.",
)
def lookup_module_address(
cls,