diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 3698e11b..b615d169 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -71,6 +71,7 @@ jobs: strategy: matrix: python-version: [ + ["3.10", "310"], ["3.11", "311"], ["3.12", "312"], ["3.13", "313"], diff --git a/precli/core/redos.py b/precli/core/redos.py index 9e7c03ed..5b3fbee6 100644 --- a/precli/core/redos.py +++ b/precli/core/redos.py @@ -3,8 +3,15 @@ import collections import itertools import sys -from re import _constants as constants -from re import _parser as parser + +try: + from re import _constants as constants +except ImportError: + import sre_constants as constants +try: + from re import _parser as parser +except ImportError: + import sre_parse as parser CR = collections.namedtuple("CR", ["cr_min", "cr_max"]) diff --git a/precli/core/symtab.py b/precli/core/symtab.py index fd592a34..00288bd3 100644 --- a/precli/core/symtab.py +++ b/precli/core/symtab.py @@ -1,5 +1,8 @@ -# Copyright 2023 Secure Sauce LLC -from typing import Self +# Copyright 2024 Secure Sauce LLC +try: + from typing import Self +except ImportError: + from typing_extensions import Self from precli.core.call import Call diff --git a/requirements.txt b/requirements.txt index c029bcfc..a259a410 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +typing-extensions==4.12.2;python_version<"3.11" rich==13.9.2 tree-sitter==0.23.1 ignorelib==0.3.0 diff --git a/setup.cfg b/setup.cfg index 89f38fbf..c66d6b14 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,6 +17,7 @@ classifier = Operating System :: Microsoft :: Windows Programming Language :: Python Programming Language :: Python :: 3 + Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 Programming Language :: Python :: 3.12 Programming Language :: Python :: 3.13 diff --git a/setup.py b/setup.py index 7f09c461..6906d759 100644 --- a/setup.py +++ b/setup.py @@ -2,5 +2,5 @@ setuptools.setup( - python_requires=">=3.11", setup_requires=["pbr>=2.0.0"], pbr=True + python_requires=">=3.10", setup_requires=["pbr>=2.0.0"], pbr=True )