diff --git a/volatility3/framework/objects/__init__.py b/volatility3/framework/objects/__init__.py index fb8975ebb..6ee24407f 100644 --- a/volatility3/framework/objects/__init__.py +++ b/volatility3/framework/objects/__init__.py @@ -3,6 +3,7 @@ # import collections +import collections.abc import logging import struct from typing import Any, ClassVar, Dict, List, Iterable, Optional, Tuple, Type, Union as TUnion, overload @@ -633,7 +634,7 @@ class Array(interfaces.objects.ObjectInterface, collections.abc.Sequence): return self.vol.count def write(self, value) -> None: - if not isinstance(value, collections.Sequence): + if not isinstance(value, collections.abc.Sequence): raise TypeError("Only Sequences can be written to arrays") self.count = len(value) for index in range(len(value)): diff --git a/volatility3/framework/renderers/__init__.py b/volatility3/framework/renderers/__init__.py index 23e686a07..de1b14c91 100644 --- a/volatility3/framework/renderers/__init__.py +++ b/volatility3/framework/renderers/__init__.py @@ -7,6 +7,7 @@ Renderers display the unified output format in some manner (be it text or file or graphical output """ import collections +import collections.abc import datetime import logging from typing import Any, Callable, Iterable, List, Optional, Tuple, TypeVar, Union @@ -70,7 +71,7 @@ class TreeNode(interfaces.renderers.TreeNode): def _validate_values(self, values: List[interfaces.renderers.BaseTypes]) -> None: """A function for raising exceptions if a given set of values is invalid according to the column properties.""" - if not (isinstance(values, collections.Sequence) and len(values) == len(self._treegrid.columns)): + if not (isinstance(values, collections.abc.Sequence) and len(values) == len(self._treegrid.columns)): raise TypeError( "Values must be a list of objects made up of simple types and number the same as the columns") for index in range(len(self._treegrid.columns)):