From 42dd4e7de1ee823e3001334fcbd9a12677bf0b4b Mon Sep 17 00:00:00 2001 From: Sofie Van Landeghem Date: Wed, 24 Sep 2025 17:58:06 +0200 Subject: [PATCH] =?utf8?q?=E2=AC=86=EF=B8=8F=20Add=20support=20for=20Pytho?= =?utf8?q?n=203.14=20(#14110)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * run test suite on Python 3.14 * add 3.14 classifier * allow Python pre-release for now * exclude pydantic v1 on Python 3.14 * install pydantic 1.12.0 alpha1 when testing on python 3.14 * preinstall pydantic 1.12.0 alpha1 before anything else --- .github/workflows/test.yml | 10 +++++++++- pyproject.toml | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b76afe01e..c1d645f59 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,6 +48,7 @@ jobs: strategy: matrix: python-version: + - "3.14" - "3.13" - "3.12" - "3.11" @@ -55,6 +56,9 @@ jobs: - "3.9" - "3.8" pydantic-version: ["pydantic-v1", "pydantic-v2"] + exclude: + - python-version: "3.14" + pydantic-version: "pydantic-v1" fail-fast: false steps: - name: Dump GitHub context @@ -66,6 +70,7 @@ jobs: uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Setup uv uses: astral-sh/setup-uv@v6 with: @@ -74,13 +79,16 @@ jobs: cache-dependency-glob: | requirements**.txt pyproject.toml + - name: Preinstall Pydantic 2.12.0a1 for Python 3.14 + if: matrix.python-version == '3.14' + run: uv pip install --pre "pydantic==2.12.0a1" - name: Install Dependencies run: uv pip install -r requirements-tests.txt - name: Install Pydantic v1 if: matrix.pydantic-version == 'pydantic-v1' run: uv pip install "pydantic>=1.10.0,<2.0.0" - name: Install Pydantic v2 - if: matrix.pydantic-version == 'pydantic-v2' + if: matrix.pydantic-version == 'pydantic-v2' && matrix.python-version != '3.14' run: uv pip install --upgrade "pydantic>=2.0.2,<3.0.0" # TODO: Remove this once Python 3.8 is no longer supported - name: Install older AnyIO in Python 3.8 diff --git a/pyproject.toml b/pyproject.toml index fbfdea79a..8e0ccde54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,6 +39,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Internet :: WWW/HTTP", ] -- 2.47.3