From 0205fd666e00c460ad80993cfa25302784a89b34 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 3 Sep 2023 22:00:39 -0600 Subject: [PATCH] Add support for Python 3.12 (#112) --- .github/workflows/main.yml | 3 ++- Makefile | 7 +++++-- src/setup.py | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 27a7ed8..06343e7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,7 +43,7 @@ jobs: strategy: matrix: - python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10"] + python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.12"] steps: - uses: actions/checkout@v3 @@ -51,6 +51,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Install dependencies run: | python -m pip install --upgrade pip wheel flake8 diff --git a/Makefile b/Makefile index cc4c5fd..00a73cc 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,7 @@ PYTHON38=python3.8 PYTHON39=python3.9 PYTHON310=python3.10 PYTHON311=python3.11 +PYTHON312=python3.12 PYTHON2=/usr/bin/python2 PYTHON3=/usr/bin/python3 PYTHON=${PYTHON3} @@ -84,7 +85,8 @@ test_lazy: .stamp-tzinfo && ${PYTHON38} test_lazy.py ${TESTARGS} \ && ${PYTHON39} test_lazy.py ${TESTARGS} \ && ${PYTHON310} test_lazy.py ${TESTARGS} \ - && ${PYTHON311} test_lazy.py ${TESTARGS} + && ${PYTHON311} test_lazy.py ${TESTARGS} \ + && ${PYTHON312} test_lazy.py ${TESTARGS} test_tzinfo: .stamp-tzinfo cd build/dist/pytz/tests \ @@ -102,7 +104,8 @@ test_tzinfo: .stamp-tzinfo && ${PYTHON38} test_tzinfo.py ${TESTARGS} \ && ${PYTHON39} test_tzinfo.py ${TESTARGS} \ && ${PYTHON310} test_tzinfo.py ${TESTARGS} \ - && ${PYTHON311} test_tzinfo.py ${TESTARGS} + && ${PYTHON311} test_tzinfo.py ${TESTARGS} \ + && ${PYTHON312} test_tzinfo.py ${TESTARGS} test_docs: .stamp-tzinfo cd build/dist/pytz/tests \ diff --git a/src/setup.py b/src/setup.py index 24f7f37..b89ec75 100644 --- a/src/setup.py +++ b/src/setup.py @@ -64,6 +64,7 @@ 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Topic :: Software Development :: Libraries :: Python Modules', ], )