diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 51da7df5a..bdac5ec0b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,7 +18,7 @@ jobs: build: strategy: matrix: - python-version: ['3.13'] + python-version: ['3.14'] platform: [ubuntu-latest, windows-latest] hook-stage: [pre-commit, pre-push, manual] diff --git a/.github/workflows/publish-site.yml b/.github/workflows/publish-site.yml index 4ca927ccb..8172787fb 100644 --- a/.github/workflows/publish-site.yml +++ b/.github/workflows/publish-site.yml @@ -22,6 +22,6 @@ jobs: with: documentation_path: docs/source pyproject_extras: dev - python_version: '3.13' + python_version: '3.14' sphinx_build_options: -W publish: ${{ github.ref_name == 'main' }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1b61c7ff8..3b7938570 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.13'] + python-version: ['3.14'] ci_pattern: - tests/mock_vws/test_query.py::TestContentType - tests/mock_vws/test_query.py::TestSuccess @@ -191,7 +191,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.13'] + python-version: ['3.14'] platform: [ubuntu-latest] steps: @@ -237,7 +237,7 @@ jobs: runs-on: windows-latest strategy: matrix: - python-version: ['3.13'] + python-version: ['3.14'] steps: - uses: actions/checkout@v6 @@ -291,6 +291,7 @@ jobs: with: enable-cache: true cache-dependency-glob: '**/pyproject.toml' + python-version: '3.14' - uses: actions/download-artifact@v8 with: diff --git a/README.rst b/README.rst index 81e350071..f49e6924f 100644 --- a/README.rst +++ b/README.rst @@ -76,4 +76,4 @@ This includes details on how to use the mock, options, and details of the differ :target: https://github.com/VWS-Python/vws-python-mock/actions .. |PyPI| image:: https://badge.fury.io/py/VWS-Python-Mock.svg :target: https://badge.fury.io/py/VWS-Python-Mock -.. |minimum-python-version| replace:: 3.13 +.. |minimum-python-version| replace:: 3.14 diff --git a/pyproject.toml b/pyproject.toml index 4f00572d7..d496ab87d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ license = "MIT" authors = [ { name = "Adam Dangoor", email = "adamdangoor@gmail.com" }, ] -requires-python = ">=3.13" +requires-python = ">=3.14" classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", @@ -28,7 +28,7 @@ classifiers = [ "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ] dynamic = [ "version", @@ -76,7 +76,7 @@ optional-dependencies.dev = [ "pyright==1.1.409", "pyroma==5.0.1", "pytest==9.0.3", - "pytest-beartype-tests==2026.4.20", + "pytest-beartype-tests==2026.4.26", "pytest-retry==1.7.0", "pytest-xdist==3.8.0", "pyyaml==6.0.3", @@ -166,6 +166,12 @@ lint.ignore = [ # Ignore 'too-many-*' errors as they seem to get in the way more than # helping. "PLR0913", + # Beartype requires imports to be available at runtime, not just for type + # checking. See https://github.com/beartype/beartype/discussions/594 + # for when beartype will support `if TYPE_CHECKING` imports. + "TC001", + "TC002", + "TC003", ] lint.per-file-ignores."ci/test_custom_linters.py" = [ # Allow asserts in tests. @@ -330,7 +336,7 @@ per_rule_ignores.DEP002 = [ [tool.pyproject-fmt] indent = 4 keep_full_version = true -max_supported_python = "3.13" +max_supported_python = "3.14" [tool.mypy] strict = true diff --git a/spelling_private_dict.txt b/spelling_private_dict.txt index 51024a882..d4ddc4a7e 100644 --- a/spelling_private_dict.txt +++ b/spelling_private_dict.txt @@ -104,6 +104,8 @@ respx rfc rgb str +stringify +subprocess timestamp todo travis diff --git a/src/mock_vws/_flask_server/Dockerfile b/src/mock_vws/_flask_server/Dockerfile index bbae92ccc..d81b96c5c 100644 --- a/src/mock_vws/_flask_server/Dockerfile +++ b/src/mock_vws/_flask_server/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/astral-sh/uv:0.10.4-python3.13-trixie-slim AS base +FROM ghcr.io/astral-sh/uv:0.11.7-python3.14-trixie-slim AS base # We set this pretend version as we do not have Git in our path, and we do # not care enough about having the version correct inside the Docker container # to install it. diff --git a/src/mock_vws/_flask_server/healthcheck.py b/src/mock_vws/_flask_server/healthcheck.py index dbc5dee4b..62cfbb971 100644 --- a/src/mock_vws/_flask_server/healthcheck.py +++ b/src/mock_vws/_flask_server/healthcheck.py @@ -15,7 +15,7 @@ def flask_app_healthy(port: int) -> bool: try: conn.request(method="GET", url="/some-random-endpoint") response = conn.getresponse() - except (TimeoutError, http.client.HTTPException, socket.gaierror): + except TimeoutError, http.client.HTTPException, socket.gaierror: return False finally: conn.close() diff --git a/src/mock_vws/target_raters.py b/src/mock_vws/target_raters.py index c844db550..bc28ce529 100644 --- a/src/mock_vws/target_raters.py +++ b/src/mock_vws/target_raters.py @@ -42,7 +42,7 @@ def _get_brisque_target_tracking_rating(*, image_content: bytes) -> int: image_tensor = image_tensor.permute(2, 0, 1).unsqueeze(dim=0) try: brisque_score = brisque(x=image_tensor, data_range=255) - except (AssertionError, IndexError): + except AssertionError, IndexError: return 0 return math.ceil(int(brisque_score.item()) / 20)