diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 36158fc56..e76d18673 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] runs-on: ${{ matrix.platform }} 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 386db8031..5cf316b52 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,7 +25,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 @@ -185,7 +185,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.13'] + python-version: ['3.14'] platform: [ubuntu-latest] steps: @@ -231,7 +231,7 @@ jobs: runs-on: windows-latest strategy: matrix: - python-version: ['3.13'] + python-version: ['3.14'] steps: - uses: actions/checkout@v6 diff --git a/README.rst b/README.rst index cd8434d30..ac98fab1f 100644 --- a/README.rst +++ b/README.rst @@ -58,4 +58,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/conftest.py b/conftest.py index 93484cd3e..8862c2d77 100644 --- a/conftest.py +++ b/conftest.py @@ -1,4 +1,11 @@ -"""Setup for Sybil.""" +""" +Setup for Sybil. + +Beartype is not applied to test functions because of a Python 3.14 +annotation issue. See: +- https://github.com/beartype/beartype/discussions/594 +- https://github.com/beartype/beartype/pull/440 +""" from doctest import ELLIPSIS @@ -12,15 +19,6 @@ from tests.mock_vws.utils.retries import RETRY_EXCEPTIONS - -@beartype -def pytest_collection_modifyitems(items: list[pytest.Item]) -> None: - """Apply the beartype decorator to all collected test functions.""" - for item in items: - if isinstance(item, pytest.Function): - item.obj = beartype(obj=item.obj) - - pytest_collect_file = Sybil( parsers=[ DocTestParser(optionflags=ELLIPSIS), diff --git a/pyproject.toml b/pyproject.toml index 6241c2aee..29d2574bb 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", @@ -162,6 +162,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" = [ @@ -350,7 +356,7 @@ DEP002 = [ [tool.pyproject-fmt] indent = 4 keep_full_version = true -max_supported_python = "3.13" +max_supported_python = "3.14" [tool.pytest.ini_options] diff --git a/src/mock_vws/_flask_server/Dockerfile b/src/mock_vws/_flask_server/Dockerfile index a08e67063..68aaa0656 100644 --- a/src/mock_vws/_flask_server/Dockerfile +++ b/src/mock_vws/_flask_server/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.13-slim AS base +FROM python:3.14-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.