From 8abd34aae9d4ad2cf32787024979781ea5d0656b Mon Sep 17 00:00:00 2001 From: Martin Thoma Date: Sat, 29 Jul 2023 09:12:37 +0200 Subject: [PATCH] MAINT: Add Python 3.12 support (#2037) See: * https://github.com/actions/python-versions/releases/ * https://pypi.org/classifiers/ * https://peps.python.org/pep-0693/ --- .github/workflows/github-ci.yaml | 14 +++++++------- pyproject.toml | 1 + requirements/ci-3.11.txt | 32 ++++++++++++++++---------------- setup.cfg | 1 + 4 files changed, 25 insertions(+), 23 deletions(-) diff --git a/.github/workflows/github-ci.yaml b/.github/workflows/github-ci.yaml index bf26836e5..a5bb51e5b 100644 --- a/.github/workflows/github-ci.yaml +++ b/.github/workflows/github-ci.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12.0-beta.4"] use-crypto-lib: ["pycryptodome"] include: - python-version: "3.9" @@ -41,14 +41,14 @@ jobs: key: cache-downloaded-files - name: Setup Python uses: actions/setup-python@v4 - if: matrix.python-version != '3.11' + if: matrix.python-version == '3.6' || matrix.python-version == '3.7' || matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10' with: python-version: ${{ matrix.python-version }} cache: 'pip' cache-dependency-path: '**/requirements/ci.txt' - - name: Setup Python (3.11) + - name: Setup Python (3.11+) uses: actions/setup-python@v4 - if: matrix.python-version == '3.11' + if: matrix.python-version == '3.11' || matrix.python-version == '3.12.0-beta.4' with: python-version: ${{ matrix.python-version }} cache: 'pip' @@ -59,11 +59,11 @@ jobs: - name: Install requirements (Python 3) run: | pip install -r requirements/ci.txt - if: matrix.python-version != '3.11' - - name: Install requirements (Python 3.11) + if: matrix.python-version == '3.6' || matrix.python-version == '3.7' || matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10' + - name: Install requirements (Python 3.11+) run: | pip install -r requirements/ci-3.11.txt - if: matrix.python-version == '3.11' + if: matrix.python-version == '3.11' || matrix.python-version == '3.12.0-beta.4' - name: Remove pycryptodome run: | pip uninstall pycryptodome -y diff --git a/pyproject.toml b/pyproject.toml index 425f6ecbd..4757f1cdd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Operating System :: OS Independent", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed", diff --git a/requirements/ci-3.11.txt b/requirements/ci-3.11.txt index 5c9e3607f..85a7fb8f4 100644 --- a/requirements/ci-3.11.txt +++ b/requirements/ci-3.11.txt @@ -4,18 +4,16 @@ # # pip-compile --output-file=requirements/ci-3.11.txt requirements/ci.in # -attrs==22.2.0 - # via - # flake8-bugbear - # pytest -coverage==7.2.2 +attrs==23.1.0 + # via flake8-bugbear +coverage==7.2.7 # via -r requirements/ci.in flake8==6.0.0 # via # -r requirements/ci.in # flake8-bugbear # flake8-print -flake8-bugbear==23.3.23 +flake8-bugbear==23.7.10 # via -r requirements/ci.in flake8-implicit-str-concat==0.4.0 # via -r requirements/ci.in @@ -27,17 +25,17 @@ iniconfig==2.0.0 # via pytest mccabe==0.7.0 # via flake8 -mypy==1.1.1 +mypy==1.4.1 # via -r requirements/ci.in mypy-extensions==1.0.0 # via mypy -packaging==23.0 +packaging==23.1 # via pytest -pillow==9.5.0 +pillow==10.0.0 # via # -r requirements/ci.in # fpdf2 -pluggy==1.0.0 +pluggy==1.2.0 # via pytest py-cpuinfo==9.0.0 # via pytest-benchmark @@ -45,11 +43,11 @@ pycodestyle==2.10.0 # via # flake8 # flake8-print -pycryptodome==3.17 +pycryptodome==3.18.0 # via -r requirements/ci.in pyflakes==3.0.1 # via flake8 -pytest==7.2.2 +pytest==7.4.0 # via # -r requirements/ci.in # pytest-benchmark @@ -63,11 +61,13 @@ pytest-timeout==2.1.0 # via -r requirements/ci.in ruff==0.0.280 # via -r requirements/ci.in -typeguard==3.0.2 +typeguard==4.0.1 # via -r requirements/ci.in types-dataclasses==0.6.6 # via -r requirements/ci.in -types-pillow==9.5.0.4 +types-pillow==10.0.0.2 # via -r requirements/ci.in -typing-extensions==4.5.0 - # via mypy +typing-extensions==4.7.1 + # via + # mypy + # typeguard diff --git a/setup.cfg b/setup.cfg index 75d6794cd..07e6116c3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -27,6 +27,7 @@ classifiers = Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 Operating System :: OS Independent Topic :: Software Development :: Libraries :: Python Modules Typing :: Typed