From b2c22098c8a4d7cca8b98fc1dc158d5c19b6388e Mon Sep 17 00:00:00 2001 From: Alban Diquet Date: Thu, 26 Dec 2024 16:12:02 +0100 Subject: [PATCH] [#668]Drop support for Python 3.8 --- .github/workflows/run_tests.yml | 4 ++-- .../workflows/run_tests_with_lowest_pydantic_version.yml | 2 +- .github/workflows/scan_apache2_server.yml | 2 +- .github/workflows/scan_iis_server.yml | 2 +- .github/workflows/scan_nginx_server.yml | 2 +- .github/workflows/test_module_setup.yml | 2 +- pyproject.toml | 2 +- setup.py | 3 +-- sslyze/json/pydantic_utils.py | 7 +------ 9 files changed, 10 insertions(+), 16 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 06a5054a..550c8083 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] + python-version: [3.9, "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 @@ -34,7 +34,7 @@ jobs: - name: Run linters # Only do linting once - if: matrix.python-version == 3.8 + if: matrix.python-version == 3.9 run: python -m invoke lint - name: Run tests diff --git a/.github/workflows/run_tests_with_lowest_pydantic_version.yml b/.github/workflows/run_tests_with_lowest_pydantic_version.yml index a0e1e9f8..fc95ccc1 100644 --- a/.github/workflows/run_tests_with_lowest_pydantic_version.yml +++ b/.github/workflows/run_tests_with_lowest_pydantic_version.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.9 - name: Install sslyze dependencies run: | diff --git a/.github/workflows/scan_apache2_server.yml b/.github/workflows/scan_apache2_server.yml index db1c6d86..7415abf6 100644 --- a/.github/workflows/scan_apache2_server.yml +++ b/.github/workflows/scan_apache2_server.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.9 - name: Install Apache2 run: | diff --git a/.github/workflows/scan_iis_server.yml b/.github/workflows/scan_iis_server.yml index 6e9fab9e..ab52d1b2 100644 --- a/.github/workflows/scan_iis_server.yml +++ b/.github/workflows/scan_iis_server.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.9 - name: Install IIS run: | diff --git a/.github/workflows/scan_nginx_server.yml b/.github/workflows/scan_nginx_server.yml index 485fcf2b..ac0b14a9 100644 --- a/.github/workflows/scan_nginx_server.yml +++ b/.github/workflows/scan_nginx_server.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.9 - name: Install Nginx run: | diff --git a/.github/workflows/test_module_setup.yml b/.github/workflows/test_module_setup.yml index 789dc3d3..e727cd9a 100644 --- a/.github/workflows/test_module_setup.yml +++ b/.github/workflows/test_module_setup.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.9 - name: Install pip run: | diff --git a/pyproject.toml b/pyproject.toml index e89d4808..cf783f23 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ line-length = 120 [tool.mypy] -python_version = "3.8" +python_version = "3.9" ignore_missing_imports = true strict_optional = true disallow_untyped_defs = true diff --git a/setup.py b/setup.py index 4eda0a64..89df2f84 100644 --- a/setup.py +++ b/setup.py @@ -62,7 +62,7 @@ def get_include_files() -> List[Tuple[str, str]]: author=project_info["__author__"], author_email=project_info["__author_email__"], license=project_info["__license__"], - python_requires=">=3.8", + python_requires=">=3.9", # Pypi metadata long_description=get_long_description(), long_description_content_type="text/markdown", @@ -72,7 +72,6 @@ def get_include_files() -> List[Tuple[str, str]]: "Intended Audience :: System Administrators", "Natural Language :: French", "License :: OSI Approved :: GNU Affero General Public License v3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", diff --git a/sslyze/json/pydantic_utils.py b/sslyze/json/pydantic_utils.py index 7af63a1c..f557baf2 100644 --- a/sslyze/json/pydantic_utils.py +++ b/sslyze/json/pydantic_utils.py @@ -1,11 +1,6 @@ from typing import Any +from typing import Annotated -try: - # Python 3.9+ - from typing import Annotated # type: ignore -except ImportError: - # Python 3.8 - from typing_extensions import Annotated from pydantic import BaseModel, BeforeValidator, ConfigDict