diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1c9752570..5be6808b0 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -31,7 +31,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] # we do not want a large number of windows and macos builds, so # enumerate them explicitly include: @@ -46,6 +46,7 @@ jobs: - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: install tox run: python -m pip install -U tox - name: run tests diff --git a/changelog.d/20230815_161655_sirosen_test_on_py3_12.rst b/changelog.d/20230815_161655_sirosen_test_on_py3_12.rst new file mode 100644 index 000000000..bfca92402 --- /dev/null +++ b/changelog.d/20230815_161655_sirosen_test_on_py3_12.rst @@ -0,0 +1,4 @@ +Python Support +~~~~~~~~~~~~~~ + +- Add support for Python 3.12. (:pr:`NUMBER`) diff --git a/requirements/py3.11/docs.txt b/requirements/py3.11/docs.txt index 7e6bb5688..60a934c69 100644 --- a/requirements/py3.11/docs.txt +++ b/requirements/py3.11/docs.txt @@ -16,7 +16,7 @@ charset-normalizer==3.2.0 # via requests docutils==0.20.1 # via sphinx -furo==2023.8.17 +furo==2023.8.19 # via -r docs.in idna==3.4 # via requests @@ -44,7 +44,7 @@ snowballstemmer==2.2.0 # via sphinx soupsieve==2.4.1 # via beautifulsoup4 -sphinx==7.2.2 +sphinx==7.2.3 # via # -r docs.in # furo @@ -75,7 +75,7 @@ sphinxcontrib-jsmath==1.0.1 # via sphinx sphinxcontrib-qthelp==1.0.6 # via sphinx -sphinxcontrib-serializinghtml==1.1.8 +sphinxcontrib-serializinghtml==1.1.9 # via sphinx types-pyyaml==6.0.12.11 # via responses diff --git a/requirements/py3.12/test.txt b/requirements/py3.12/test.txt new file mode 100644 index 000000000..afb1810ab --- /dev/null +++ b/requirements/py3.12/test.txt @@ -0,0 +1,40 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# tox p -m freezedeps +# +certifi==2023.7.22 + # via requests +charset-normalizer==3.2.0 + # via requests +coverage==7.3.0 + # via -r test.in +execnet==2.0.2 + # via pytest-xdist +idna==3.4 + # via requests +iniconfig==2.0.0 + # via pytest +packaging==23.1 + # via pytest +pluggy==1.2.0 + # via pytest +pytest==7.4.0 + # via + # -r test.in + # pytest-xdist +pytest-xdist==3.3.1 + # via -r test.in +pyyaml==6.0.1 + # via responses +requests==2.31.0 + # via responses +responses==0.23.3 + # via -r test.in +types-pyyaml==6.0.12.11 + # via responses +urllib3==2.0.4 + # via + # requests + # responses diff --git a/setup.cfg b/setup.cfg index 475c61996..ca9d38179 100644 --- a/setup.cfg +++ b/setup.cfg @@ -20,6 +20,7 @@ classifiers = Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 [options] python_requires = >=3.7 diff --git a/tests/functional/services/timer/test_jobs.py b/tests/functional/services/timer/test_jobs.py index bea69fc9e..0c1101499 100644 --- a/tests/functional/services/timer/test_jobs.py +++ b/tests/functional/services/timer/test_jobs.py @@ -1,5 +1,5 @@ +import datetime import json -from datetime import datetime, timedelta import pytest @@ -39,9 +39,9 @@ def test_get_job_errors(timer_client): assert err.message == "Request failed terribly" -@pytest.mark.parametrize("start", [datetime.utcnow(), "2022-04-05T06:00:00"]) +@pytest.mark.parametrize("start", [datetime.datetime.now(), "2022-04-05T06:00:00"]) @pytest.mark.parametrize( - "interval", [timedelta(days=1), timedelta(minutes=60), 600, None] + "interval", [datetime.timedelta(days=1), datetime.timedelta(minutes=60), 600, None] ) def test_create_job(timer_client, start, interval): meta = load_response(timer_client.create_job).metadata @@ -57,11 +57,11 @@ def test_create_job(timer_client, start, interval): assert response.http_status == 201 assert response.data["job_id"] == meta["job_id"] req_body = json.loads(get_last_request().body) - if isinstance(start, datetime): + if isinstance(start, datetime.datetime): assert req_body["start"] == start.isoformat() else: assert req_body["start"] == start - if isinstance(interval, timedelta): + if isinstance(interval, datetime.timedelta): assert req_body["interval"] == interval.total_seconds() else: assert req_body["interval"] == interval diff --git a/tox.ini b/tox.ini index 692656f13..54481e77c 100644 --- a/tox.ini +++ b/tox.ini @@ -4,14 +4,14 @@ envlist = mypy test-lazy-imports coverage_clean - py{311,310,39,38,37} + py{312,311,310,39,38,37} py37-mindeps coverage_report docs skip_missing_interpreters = true minversion = 4.0.0 labels = - freezedeps = freezedeps-py{311,310,39,38,37} + freezedeps = freezedeps-py{312,311,310,39,38,37} [testenv] # build a wheel, not a tarball, and use a common env to do it (so that the wheel is shared) @@ -95,7 +95,7 @@ commands_pre = rm -rf dist/ changedir = tests/non-pytest/poetry-lock-test commands = poetry lock -[testenv:freezedeps-py{311,310,39,38,37}] +[testenv:freezedeps-py{312,311,310,39,38,37}] description = freeze development dependencies using pip-compile skip_install = true setenv =