From 97a1160a8d740f6087ad4e2d719a43a47f49638b Mon Sep 17 00:00:00 2001 From: bunny-therapist Date: Thu, 22 Jun 2023 22:56:02 +0200 Subject: [PATCH] Remove support for Python 3.7 EOL 2023-06-27 --- .github/workflows/ci.yaml | 2 +- pyproject.toml | 3 +-- src/security_constraints/common.py | 5 +---- src/security_constraints/github_security_advisory.py | 6 +----- src/security_constraints/main.py | 7 +------ tox.ini | 2 +- 6 files changed, 6 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7d6d4fe..65d3526 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,7 +10,7 @@ jobs: build: strategy: matrix: - python_version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python_version: ["3.8", "3.9", "3.10", "3.11"] runs-on: "ubuntu-latest" steps: - uses: actions/checkout@v2 diff --git a/pyproject.toml b/pyproject.toml index ae71949..d858d1e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,11 +4,10 @@ description = "Fetches security vulnerabilities and creates pip-constraints base readme = "README.md" license = {file = "LICENSE"} urls = {repo = "https://github.com/mam-dev/security-constraints"} -requires-python = ">=3.7" +requires-python = ">=3.8" dependencies = [ "requests", "pyyaml", - "importlib-metadata >= 1.0 ; python_version < '3.8'" ] dynamic = ["version"] diff --git a/src/security_constraints/common.py b/src/security_constraints/common.py index 5966fad..f41f17f 100644 --- a/src/security_constraints/common.py +++ b/src/security_constraints/common.py @@ -24,10 +24,7 @@ if TYPE_CHECKING: # pragma: no cover - if sys.version_info >= (3, 8): - from typing import TypedDict - else: - from typing_extensions import TypedDict + from typing import TypedDict class _ConfigurationKwargs(TypedDict, total=False): ignore_ids: Set[str] diff --git a/src/security_constraints/github_security_advisory.py b/src/security_constraints/github_security_advisory.py index c087287..ed2903a 100644 --- a/src/security_constraints/github_security_advisory.py +++ b/src/security_constraints/github_security_advisory.py @@ -16,11 +16,7 @@ if TYPE_CHECKING: # pragma: no cover import sys - - if sys.version_info >= (3, 8): - from typing import TypedDict - else: - from typing_extensions import TypedDict + from typing import TypedDict class _GraphQlResponseJson(TypedDict, total=False): data: Dict[Any, Any] diff --git a/src/security_constraints/main.py b/src/security_constraints/main.py index 5538f1f..cb7cfe3 100644 --- a/src/security_constraints/main.py +++ b/src/security_constraints/main.py @@ -3,12 +3,7 @@ import logging import sys from datetime import datetime, timezone - -if sys.version_info >= (3, 8): - from importlib.metadata import version # pragma: no cover (=py38) - +from importlib.metadata import version from typing import IO, List, Optional, Sequence, Set import yaml diff --git a/tox.ini b/tox.ini index f92c06a..0ed5394 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py37,py38,py39,py310,py311 +envlist = py38,py39,py310,py311 isolated_build = True [testenv]