From fefed3d47bce8850ec9d4ccc30740045e4a4ccdd Mon Sep 17 00:00:00 2001 From: Jonathan Green Date: Wed, 30 Oct 2024 18:37:03 -0300 Subject: [PATCH] Add Python 3.12 to CI (#2146) * Run tests with Python 3.12 * Add Python 3.12 to CI --- .github/workflows/test.yml | 2 +- README.md | 3 ++- tests/manager/api/controller/test_base.py | 2 +- tox.ini | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b0b6a8c33c..b8f09d55da 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,7 +19,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10", "3.11"] + python-version: ["3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 diff --git a/README.md b/README.md index f370d42e7e..4c253e14aa 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/) [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit) -![Python: 3.10,3.11](https://img.shields.io/badge/Python-3.10%20|%203.11-blue) +![Python: 3.10,3.11,3.12](https://img.shields.io/badge/Python-3.10%20|%203.11%20|%203.12-blue) This is a [The Palace Project](https://thepalaceproject.org) maintained fork of the NYPL [Library Simplified](http://www.librarysimplified.org/) Circulation Manager. @@ -611,6 +611,7 @@ with service dependencies running in docker containers. |--------|----------------| | py310 | Python 3.10 | | py311 | Python 3.11 | +| py312 | Python 3.12 | All of these environments are tested by default when running tox. To test one specific environment you can use the `-e` flag. diff --git a/tests/manager/api/controller/test_base.py b/tests/manager/api/controller/test_base.py index 592c725cea..470d50b5cd 100644 --- a/tests/manager/api/controller/test_base.py +++ b/tests/manager/api/controller/test_base.py @@ -312,7 +312,7 @@ def test_load_work(self, circulation_fixture: CirculationControllerFixture): pool1.identifier.type, pool1.identifier.identifier, ) - work.age_appropriate_for_patron.called_with( + work.age_appropriate_for_patron.assert_called_once_with( circulation_fixture.default_patron ) diff --git a/tox.ini b/tox.ini index 79b0d47953..929cec1f92 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{310,311}-docker +envlist = py{310,311,312}-docker skipsdist = true [testenv] @@ -86,3 +86,4 @@ host_var = python = 3.10: py310 3.11: py311 + 3.12: py312