Core: Increment minimum python version to 3.6

This commit is contained in:
Mike Auty
2021-05-26 23:23:27 +01:00
parent 9e7e82f026
commit 0214fa35a1
2 changed files with 3 additions and 18 deletions
+1 -2
View File
@@ -3,11 +3,10 @@
#
"""Volatility 3 framework."""
# Check the python version to ensure it's suitable
# We currently require 3.5.3 since 3.5.1 has no typing.Type and 3.5.2 is broken for ''/delayed encapsulated types
import glob
import sys
required_python_version = (3, 5, 3)
required_python_version = (3, 6, 0)
if (sys.version_info.major != required_python_version[0] or sys.version_info.minor < required_python_version[1] or
(sys.version_info.minor == required_python_version[1] and sys.version_info.micro < required_python_version[2])):
raise RuntimeError(
@@ -30,23 +30,9 @@ class RegValueTypes(enum.Enum):
REG_QWORD = 11
REG_UNKNOWN = 99999
# TODO: This _missing_() method can replace the get() method below
# if support for Python 3.6 is added in the future
# @classmethod
# def _missing_(cls, value):
# return cls(RegValueTypes.REG_UNKNOWN)
@classmethod
def get(cls, value):
"""An alternative method for using this enum when the value may be
unknown.
This is used to support unknown value requests in Python <3.6.
"""
try:
return cls(value)
except ValueError:
return cls(RegValueTypes.REG_UNKNOWN)
def _missing_(cls, value):
return cls(RegValueTypes.REG_UNKNOWN)
class RegKeyFlags(enum.IntEnum):