From c4529f591bd7bbcc32207028f14abf4963cb602a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Tue, 2 Jul 2024 14:37:23 -0600 Subject: [PATCH] test: Start testing with Python 3.13 --- .github/workflows/test.yml | 11 +++++++++-- noxfile.py | 20 ++++++++++++++++++-- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3acc509fb..32d1cf7af 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,17 +41,23 @@ jobs: runs-on: ${{ matrix.os }} continue-on-error: true env: - NOXPYTHON: ${{ matrix.python-version }} + NOXFORCEPYTHON: ${{ matrix.python-version }} NOXSESSION: ${{ matrix.session }} strategy: fail-fast: false matrix: session: [tests] os: ["ubuntu-latest", "macos-latest", "windows-latest"] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12" sqlalchemy: ["2"] include: - { session: tests, python-version: "3.12", os: "ubuntu-latest", sqlalchemy: "1" } + - { session: tests, python-version: "3.13", os: "ubuntu-latest", sqlalchemy: "2" } - { session: doctest, python-version: "3.12", os: "ubuntu-latest", sqlalchemy: "2" } - { session: mypy, python-version: "3.12", os: "ubuntu-latest", sqlalchemy: "2" } - { session: deps, python-version: "3.12", os: "ubuntu-latest", sqlalchemy: "2" } @@ -74,6 +80,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Upgrade pip env: diff --git a/noxfile.py b/noxfile.py index a07c953ab..87b455729 100644 --- a/noxfile.py +++ b/noxfile.py @@ -6,6 +6,7 @@ import shutil import sys import tempfile +import typing as t from pathlib import Path from textwrap import dedent @@ -45,7 +46,7 @@ ) poetry_config = nox.project.load_toml("pyproject.toml")["tool"]["poetry"] -test_dependencies = poetry_config["group"]["dev"]["dependencies"].keys() +test_dependencies: dict[str, t.Any] = poetry_config["group"]["dev"]["dependencies"] typing_dependencies = poetry_config["group"]["typing"]["dependencies"].keys() @@ -63,7 +64,22 @@ def mypy(session: Session) -> None: @session(python=python_versions) def tests(session: Session) -> None: """Execute pytest tests and compute coverage.""" - session.install(".[faker,jwt,parquet,s3]") + extras = [ + "faker", + "jwt", + "parquet", + "s3", + ] + + if session.python == "3.13": + # https://github.com/apache/arrow/issues/43519 + extras.remove("parquet") + + # https://github.com/duckdb/duckdb/discussions/13352 + test_dependencies.pop("duckdb") + test_dependencies.pop("duckdb-engine") + + session.install(f".[{','.join(extras)}]") session.install(*test_dependencies) sqlalchemy_version = os.environ.get("SQLALCHEMY_VERSION")