From 863fd69b1307a59b0fee9167fd305f705a082836 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Mon, 17 Jun 2024 14:48:58 +0100 Subject: [PATCH] Drop python 3.9 support and enable 3.13 (#215) --- .github/workflows/tox.yml | 11 ++++++----- .pre-commit-config.yaml | 2 +- mypy.ini | 2 +- pyproject.toml | 8 ++++---- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 39739b4..abbe8a6 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -28,8 +28,9 @@ jobs: id: generate_matrix uses: coactions/dynamic-matrix@v1 with: - min_python: "3.9" - max_python: "3.12" + min_python: "3.10" + default_python: "3.10" + max_python: "3.13" other_names: | lint docs @@ -64,12 +65,12 @@ jobs: sudo apt-get update \ && sudo apt-get install -y libvirt-dev zsh - - name: Set up Python ${{ matrix.python_version || '3.9' }} + - name: Set up Python ${{ matrix.python_version || '3.10' }} if: "!contains(matrix.shell, 'wsl')" uses: actions/setup-python@v5 with: cache: pip - python-version: ${{ matrix.python_version || '3.9' }} + python-version: ${{ matrix.python_version || '3.10' }} - name: Install tox run: | @@ -145,7 +146,7 @@ jobs: - name: Check for expected number of coverage.xml reports run: | - JOBS_PRODUCING_COVERAGE=4 + JOBS_PRODUCING_COVERAGE=6 if [ "$(find . -name coverage.xml | wc -l | bc)" -ne "${JOBS_PRODUCING_COVERAGE}" ]; then echo "::error::Number of coverage.xml files was not the expected one (${JOBS_PRODUCING_COVERAGE}): $(find . -name coverage.xml |xargs echo)" exit 1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1ee16da..dbec4b5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,7 +49,7 @@ repos: hooks: - id: mypy # mypy args needed in order to match mypy cli behavior - args: ["--python-version", "3.9"] + args: ["--python-version", "3.10"] entry: mypy src/ pass_filenames: false additional_dependencies: diff --git a/mypy.ini b/mypy.ini index c1befcc..9133676 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,5 +1,5 @@ [mypy] -python_version = 3.9 +python_version = 3.10 color_output = True error_summary = True # TODO(ssbarnea): Remove ignores below: diff --git a/pyproject.toml b/pyproject.toml index dc09b4c..72bc1f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta" [project] # https://peps.python.org/pep-0621/#readme -requires-python = ">=3.9" +requires-python = ">=3.10" dynamic = ["version", "dependencies", "optional-dependencies"] name = "mk" description = "mk" @@ -24,10 +24,10 @@ classifiers = [ "Operating System :: MacOS", "Operating System :: POSIX", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python", "Topic :: Software Development :: Quality Assurance", @@ -90,7 +90,7 @@ concurrency = ["multiprocessing", "thread"] profile = "black" [tool.mypy] -python_version = "3.9" +python_version = "3.10" strict = true color_output = true error_summary = true @@ -115,7 +115,7 @@ disable = [ ] [tool.ruff] -target-version = "py39" +target-version = "py310" # Same as Black. line-length = 88 lint.ignore = [