From 8f8a5be4b79010ca938ef4317417feee3084a8fe 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 01/16] 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") From 3e34b188eb435881dea8f12c493b0104ff529d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Wed, 28 Aug 2024 11:39:31 -0600 Subject: [PATCH 02/16] Let tests run --- samples/sample_target_parquet/parquet_target_sink.py | 9 ++++++--- tests/contrib/test_batch_encoder_parquet.py | 4 ++++ tests/core/sinks/test_sql_sink.py | 1 + tests/core/test_connector_sql.py | 1 + tests/samples/test_target_parquet.py | 1 + tests/samples/test_target_sqlite.py | 1 + 6 files changed, 14 insertions(+), 3 deletions(-) diff --git a/samples/sample_target_parquet/parquet_target_sink.py b/samples/sample_target_parquet/parquet_target_sink.py index e98dca2b1..fbdd13cd1 100644 --- a/samples/sample_target_parquet/parquet_target_sink.py +++ b/samples/sample_target_parquet/parquet_target_sink.py @@ -4,11 +4,14 @@ import typing as t -import pyarrow as pa -import pyarrow.parquet as pq - from singer_sdk.sinks import BatchSink +try: + import pyarrow as pa + import pyarrow.parquet as pq +except ImportError: + pass + def json_schema_to_arrow(schema: dict[str, t.Any]) -> pa.Schema: """Convert a JSON Schema to an Arrow schema. diff --git a/tests/contrib/test_batch_encoder_parquet.py b/tests/contrib/test_batch_encoder_parquet.py index 0318e41d3..11ef6faca 100644 --- a/tests/contrib/test_batch_encoder_parquet.py +++ b/tests/contrib/test_batch_encoder_parquet.py @@ -4,6 +4,8 @@ import typing as t +import pytest + from singer_sdk.contrib.batch_encoder_parquet import ParquetBatcher from singer_sdk.helpers._batch import BatchConfig, ParquetEncoding, StorageTarget @@ -11,6 +13,7 @@ from pathlib import Path +@pytest.mark.xfail def test_batcher(tmp_path: Path) -> None: root = tmp_path.joinpath("batches") root.mkdir() @@ -30,6 +33,7 @@ def test_batcher(tmp_path: Path) -> None: assert batches[0][0].endswith(".parquet") +@pytest.mark.xfail def test_batcher_gzip(tmp_path: Path) -> None: root = tmp_path.joinpath("batches") root.mkdir() diff --git a/tests/core/sinks/test_sql_sink.py b/tests/core/sinks/test_sql_sink.py index c20be40f6..746952a47 100644 --- a/tests/core/sinks/test_sql_sink.py +++ b/tests/core/sinks/test_sql_sink.py @@ -22,6 +22,7 @@ class DuckDBTarget(SQLTarget): default_sink_class = DuckDBSink +@pytest.mark.xfail class TestDuckDBSink: @pytest.fixture def target(self) -> DuckDBTarget: diff --git a/tests/core/test_connector_sql.py b/tests/core/test_connector_sql.py index c8390f33d..522794c01 100644 --- a/tests/core/test_connector_sql.py +++ b/tests/core/test_connector_sql.py @@ -292,6 +292,7 @@ def test_engine_json_serialization(self, connector: SQLConnector): ] +@pytest.mark.xfail class TestDuckDBConnector: @pytest.fixture def connector(self): diff --git a/tests/samples/test_target_parquet.py b/tests/samples/test_target_parquet.py index 4be4782d5..22fe4918d 100644 --- a/tests/samples/test_target_parquet.py +++ b/tests/samples/test_target_parquet.py @@ -23,6 +23,7 @@ ) +@pytest.mark.xfail class TestSampleTargetParquet(StandardTests): """Standard Target Tests.""" diff --git a/tests/samples/test_target_sqlite.py b/tests/samples/test_target_sqlite.py index 4f6d54e60..24b30f3d8 100644 --- a/tests/samples/test_target_sqlite.py +++ b/tests/samples/test_target_sqlite.py @@ -367,6 +367,7 @@ def test_sqlite_process_batch_message( assert cursor.fetchone()[0] == 4 +@pytest.mark.xfail def test_sqlite_process_batch_parquet( sqlite_target_test_config: dict, sqlite_sample_target_batch: SQLiteTarget, From 932a2933f951c0e6abde77381eca8ebd2018f2cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Thu, 26 Sep 2024 12:43:39 -0600 Subject: [PATCH 03/16] Bump duckdb to get Python 3.13 wheels --- noxfile.py | 4 --- poetry.lock | 100 ++++++++++++++++++++++++++++------------------------ 2 files changed, 53 insertions(+), 51 deletions(-) diff --git a/noxfile.py b/noxfile.py index 87b455729..e995396ae 100644 --- a/noxfile.py +++ b/noxfile.py @@ -75,10 +75,6 @@ def tests(session: Session) -> None: # 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) diff --git a/poetry.lock b/poetry.lock index 28180d0a3..5fd977b92 100644 --- a/poetry.lock +++ b/poetry.lock @@ -599,57 +599,63 @@ files = [ [[package]] name = "duckdb" -version = "1.1.0" +version = "1.1.1" description = "DuckDB in-process database" optional = false python-versions = ">=3.7.0" files = [ - {file = "duckdb-1.1.0-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:5e4cbc408e6e41146dea89b9044dae7356e353db0c96b183e5583ee02bc6ae5d"}, - {file = "duckdb-1.1.0-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:6370ae27ec8167ccfbefb94f58ad9fdc7bac142399960549d6d367f233189868"}, - {file = "duckdb-1.1.0-cp310-cp310-macosx_12_0_x86_64.whl", hash = "sha256:4e1c3414f7fd01f4810dc8b335deffc91933a159282d65fef11c1286bc0ded04"}, - {file = "duckdb-1.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c6bc2a58689adf5520303c5f68b065b9f980bd31f1366c541b8c7490abaf55cd"}, - {file = "duckdb-1.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d02be208d2885ca085d4c852b911493b8cdac9d6eae893259da32bd72a437c25"}, - {file = "duckdb-1.1.0-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:655df442ceebfc6f3fd6c8766e04b60d44dddedfa90275d794f9fab2d3180879"}, - {file = "duckdb-1.1.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:6e183729bb64be7798ccbfda6283ebf423c869268c25af2b56929e48f763be2f"}, - {file = "duckdb-1.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:61fb838da51e07ceb0222c4406b059b90e10efcc453c19a3650b73c0112138c4"}, - {file = "duckdb-1.1.0-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:7807e2f0d3344668e433f0dc1f54bfaddd410589611393e9a7ed56f8dec9514f"}, - {file = "duckdb-1.1.0-cp311-cp311-macosx_12_0_universal2.whl", hash = "sha256:3da30b7b466f710d52caa1fdc3ef0bf4176ad7f115953cd9f8b0fbf0f723778f"}, - {file = "duckdb-1.1.0-cp311-cp311-macosx_12_0_x86_64.whl", hash = "sha256:b9b6a77ef0183f561b1fc2945fcc762a71570ffd33fea4e3a855d413ed596fe4"}, - {file = "duckdb-1.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:16243e66a9fd0e64ee265f2634d137adc6593f54ddf3ef55cb8a29e1decf6e54"}, - {file = "duckdb-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42b910a149e00f40a1766dc74fa309d4255b912a5d2fdcc387287658048650f6"}, - {file = "duckdb-1.1.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:47849d546dc4238c0f20e95fe53b621aa5b08684e68fff91fd84a7092be91a17"}, - {file = "duckdb-1.1.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:11ec967b67159361ceade34095796a8d19368ea5c30cad988f44896b082b0816"}, - {file = "duckdb-1.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:510b5885ed6c267b9c0e1e7c6138fdffc2dd6f934a5a95b76da85da127213338"}, - {file = "duckdb-1.1.0-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:657bc7ac64d5faf069a782ae73afac51ef30ae2e5d0e09ce6a09d03db84ab35e"}, - {file = "duckdb-1.1.0-cp312-cp312-macosx_12_0_universal2.whl", hash = "sha256:89f3de8cba57d19b41cd3c47dd06d979bd2a2ffead115480e37afbe72b02896d"}, - {file = "duckdb-1.1.0-cp312-cp312-macosx_12_0_x86_64.whl", hash = "sha256:f6486323ab20656d22ffa8f3c6e109dde30d0b327b7c831f22ebcfe747f97fb0"}, - {file = "duckdb-1.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:78a4510f82431ee3f14db689fe8727a4a9062c8f2fbb3bcfe3bfad3c1a198004"}, - {file = "duckdb-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64bf2a6e23840d662bd2ac09206a9bd4fa657418884d69e5c352d4456dc70b3c"}, - {file = "duckdb-1.1.0-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:23fc9aa0af74e3803ed90c8d98280fd5bcac8c940592bf6288e8fd60fb051d00"}, - {file = "duckdb-1.1.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1f3aea31341ce400640dd522e4399b941f66df17e39884f446638fe958d6117c"}, - {file = "duckdb-1.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:3db4ab31c20de4edaef152930836b38e7662cd71370748fdf2c38ba9cf854dc4"}, - {file = "duckdb-1.1.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e3b6b4fe1edfe35f64f403a9f0ab75258cee35abd964356893ee37424174b7e4"}, - {file = "duckdb-1.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aad02f50d5a2020822d1638fc1a9bcf082056f11d2e15ccfc1c1ed4d0f85a3be"}, - {file = "duckdb-1.1.0-cp37-cp37m-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:eb66e9e7391801928ea134dcab12d2e4c97f2ce0391c603a3e480bbb15830bc8"}, - {file = "duckdb-1.1.0-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:069fb7bca459e31edb32a61f0eea95d7a8a766bef7b8318072563abf8e939593"}, - {file = "duckdb-1.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:e39f9b7b62e64e10d421ff04480290a70129c38067d1a4f600e9212b10542c5a"}, - {file = "duckdb-1.1.0-cp38-cp38-macosx_12_0_arm64.whl", hash = "sha256:55ef98bcc7ba745752607f1b926e8d9b7ce32c42c423bbad10c44820aefe23a7"}, - {file = "duckdb-1.1.0-cp38-cp38-macosx_12_0_universal2.whl", hash = "sha256:e2a08175e43b865c1e9611efd18cacd29ddd69093de442b1ebdf312071df7719"}, - {file = "duckdb-1.1.0-cp38-cp38-macosx_12_0_x86_64.whl", hash = "sha256:0e3644b1f034012d82b9baa12a7ea306fe71dc6623731b28c753c4a617ff9499"}, - {file = "duckdb-1.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:211a33c1ddb5cc609f75eb43772b0b03b45d2fa89bec107e4715267ca907806a"}, - {file = "duckdb-1.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8e74b6f8a5145abbf7e6c1a2a61f0adbcd493c19b358f524ec9a3cebdf362abb"}, - {file = "duckdb-1.1.0-cp38-cp38-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:58f1633dd2c5af5088ae2d119418e200855d0699d84f2fae9d46d30f404bcead"}, - {file = "duckdb-1.1.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:d18caea926b1e301c29b140418fca697aad728129e269b4f82c2795a184549e1"}, - {file = "duckdb-1.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:cd9fb1408942411ad360f8414bc3fbf0091c396ca903d947a10f2e31324d5cbd"}, - {file = "duckdb-1.1.0-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:bd11bc899cebf5ff936d1276a2dfb7b7db08aba3bcc42924afeafc2163bddb43"}, - {file = "duckdb-1.1.0-cp39-cp39-macosx_12_0_universal2.whl", hash = "sha256:53825a63193c582a78c152ea53de8d145744ddbeea18f452625a82ebc33eb14a"}, - {file = "duckdb-1.1.0-cp39-cp39-macosx_12_0_x86_64.whl", hash = "sha256:29dc18087de47563b3859a6b98bbed96e1c96ce5db829646dc3b16a916997e7d"}, - {file = "duckdb-1.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ecb19319883564237a7a03a104dbe7f445e73519bb67108fcab3d19b6b91fe30"}, - {file = "duckdb-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aac2fcabe2d5072c252d0b3087365f431de812d8199705089fb073e4d039d19c"}, - {file = "duckdb-1.1.0-cp39-cp39-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d89eaaa5df8a57e7d2bc1f4c46493bb1fee319a00155f2015810ad2ace6570ae"}, - {file = "duckdb-1.1.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:d86a6926313913cd2cc7e08816d3e7f72ba340adf2959279b1a80058be6526d9"}, - {file = "duckdb-1.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:d8333f3e85fa2a0f1c222b752c2bd42ea875235ff88492f7bcbb6867d0f644eb"}, - {file = "duckdb-1.1.0.tar.gz", hash = "sha256:b4d4c12b1f98732151bd31377753e0da1a20f6423016d2d097d2e31953ec7c23"}, + {file = "duckdb-1.1.1-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:e310610b692d30aa7f1f40d7878b26978a5b191f23fa8fa082bd17092c67c2fd"}, + {file = "duckdb-1.1.1-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:7acc97c3cc995850a4fa59dfa6ce713d7ea187c9696632161aa09d898f001a2b"}, + {file = "duckdb-1.1.1-cp310-cp310-macosx_12_0_x86_64.whl", hash = "sha256:c0a09d78daea0de7ddf3d6d1113e80ceed8c15537e93f8efaad53024ffbde245"}, + {file = "duckdb-1.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50c3b1667b0c73cb076b1b1f8fa0fd88fcef5c2bbb2b9acdef79e2eae429c248"}, + {file = "duckdb-1.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1499a9b159d4675ea46786b7ebdbabd8287c62b6b116ccfd529112318d47184e"}, + {file = "duckdb-1.1.1-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:876deda2ce97f4a9005a9ac862f0ebee9e5956d51d589a24955802ca91726d49"}, + {file = "duckdb-1.1.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:40be901b38c709076f699b0c2f42a0c5663a496647eba350530e3a77f46a239b"}, + {file = "duckdb-1.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:5cb7642c5b21b8165b60029c274fc931c7c29cae3124b9a95ed73d050dd23584"}, + {file = "duckdb-1.1.1-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:959716b65cf1c94fc117ac9c9692eea0bd64ae53bc8ab6538d459087b474dbeb"}, + {file = "duckdb-1.1.1-cp311-cp311-macosx_12_0_universal2.whl", hash = "sha256:6ff3c52ce0f8d25478155eb01de043ad0a25badbd10e684a2cd74363f1b86cde"}, + {file = "duckdb-1.1.1-cp311-cp311-macosx_12_0_x86_64.whl", hash = "sha256:430294cf11ce866d3b726cf4530462316e20b773fed3cf2de3cf63eb89650da6"}, + {file = "duckdb-1.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dc9d48f772fafeea52568a0568cd11314cd79a10214069f3700dbcb31ebdf511"}, + {file = "duckdb-1.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:572095739024d9a5aa2dd8336c289af6a624c203004213e49b7e2469275e940f"}, + {file = "duckdb-1.1.1-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:660d9baf637b9a15e1ba74bbe02d3b4a20d82e8cbbd7d0712e0d59e3e9d6efea"}, + {file = "duckdb-1.1.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b91973605c8a30a38c4381a27895e7768cb3caa6700b2534ab76cc6b72cac390"}, + {file = "duckdb-1.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:f57c9e070cecf42d379145a75f325ec57fb1d410d6ff6592b5a28c2ff2b5792c"}, + {file = "duckdb-1.1.1-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:926a99b81c50b9a4a43ca26dcb781f934d35e773d22913548396601ab8d44c12"}, + {file = "duckdb-1.1.1-cp312-cp312-macosx_12_0_universal2.whl", hash = "sha256:55a2632d27b5a965f1d9fc74b03383e80a3f8e3dc9596807dfb02c8db08cfcb7"}, + {file = "duckdb-1.1.1-cp312-cp312-macosx_12_0_x86_64.whl", hash = "sha256:8d8174fe47caf48d830dc477a45cedc8c970722df09dc1456bddc760ff6ccf68"}, + {file = "duckdb-1.1.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9ad84023399002222fa8d5264a8dc2083053027910df728da92cabb07494a489"}, + {file = "duckdb-1.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1c8adbc8b37444424c72043288f1521c860555a4f151ee4b744e6125f5d05729"}, + {file = "duckdb-1.1.1-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:550524c1b423eeb7ca0fdf1c2e6d29e723d7ec7cfab3050b9feb55a620ae927f"}, + {file = "duckdb-1.1.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:4064243e4d3f445975b78773677de0ccbe924f9c7058a7c2cfedb24bba2ba939"}, + {file = "duckdb-1.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:4f64516dc62dd0fcbb9785c5bc7532a4fca3e6016bbcc92a2b235aa972c631f6"}, + {file = "duckdb-1.1.1-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:4bf75a64c927470b6618496adcfbf0f316ef09d46a44cfe8e38b78e9ff40c8a0"}, + {file = "duckdb-1.1.1-cp313-cp313-macosx_12_0_universal2.whl", hash = "sha256:5c8cd6fd7107299b9a243836cd8163e4c08d6228f18cbee4ed9f535f53300096"}, + {file = "duckdb-1.1.1-cp313-cp313-macosx_12_0_x86_64.whl", hash = "sha256:fc81c02b4d73533a438a9bbae19499531d85b752233c905facc4df41bbde043c"}, + {file = "duckdb-1.1.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:baff4014caf6553b624a296e4db2926602670bd9be6e0fc75f3e970b085631b0"}, + {file = "duckdb-1.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e21b75a9a60f10b5b5033138c317d929018c92f355fadae5949b310a9179e0a7"}, + {file = "duckdb-1.1.1-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8220f039c5ea06dc126232464ab9b77197f80ae53d4611b0a41f73c54f6f3931"}, + {file = "duckdb-1.1.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:07384414ceae585d4106a7dc154331ae42f45390ed675ec81e3d01f2252a6b01"}, + {file = "duckdb-1.1.1-cp313-cp313-win_amd64.whl", hash = "sha256:82776b3999e71a962db0bdc3f0258407ef41453f63eb47c33da29b644f8eb530"}, + {file = "duckdb-1.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35d4323655be4053fb90d47e85222c93fd56aea0e8ab0ac44bd8f7249ba85697"}, + {file = "duckdb-1.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:990d0799e0f543a4369413dc6caf7782cbbab49955c08c28ac56d5dab5ccef11"}, + {file = "duckdb-1.1.1-cp37-cp37m-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5ef3ba36b317abe000f502702eaaefdd8c3651a25aa0ad409f9487b286e2fb28"}, + {file = "duckdb-1.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:2c6e513a572967cd2bab0f20ce265f8eaf95ea7b554eecf1c233717c38569abc"}, + {file = "duckdb-1.1.1-cp38-cp38-macosx_12_0_arm64.whl", hash = "sha256:567471cb964a0e54a7874c578e81af7b6ab474676ae6469ae1c33c2353f76fb1"}, + {file = "duckdb-1.1.1-cp38-cp38-macosx_12_0_universal2.whl", hash = "sha256:a41d8eb4dc538d17660b78f2f4ecd0ba29666a396453bb71d6f4972bf2b3959e"}, + {file = "duckdb-1.1.1-cp38-cp38-macosx_12_0_x86_64.whl", hash = "sha256:31be0b9bc1909fb60abda7cd30615fe0224d1e451160d79e8e0313d6205417b0"}, + {file = "duckdb-1.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:541fb49da108e080d4f2984d2fdabaee36d65967a33642f8bce03373b29952f0"}, + {file = "duckdb-1.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e1c54f836dac5eddbe369fa654811e979bb07688638a52d1c006172feb5b75a5"}, + {file = "duckdb-1.1.1-cp38-cp38-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:afb97970ee72e554b507c6f2e40b356bdbf8fc1f466e7c4d1797183eb66c0809"}, + {file = "duckdb-1.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:a2cdcb68247f02017a35a0b617ceb1d36a02a7c0588d7e2ed91c9a4e9f14c3f6"}, + {file = "duckdb-1.1.1-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:36d71969cb98d10dc2391d8755921258d197995cc8c69e6c82fc377c2f71940a"}, + {file = "duckdb-1.1.1-cp39-cp39-macosx_12_0_universal2.whl", hash = "sha256:3693f464409379a21aff4e35b5f67eb6c96fc402649d9ffddbda4ee9ee9ba9b6"}, + {file = "duckdb-1.1.1-cp39-cp39-macosx_12_0_x86_64.whl", hash = "sha256:06ca7f4ca785cc86e9f9aa23d16b67b82dc454b14c396b2e0ff4c09698c7838e"}, + {file = "duckdb-1.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5ed92f3229bf70897a742e7648f648aa8b0c81a7489072aec5515c5635f3303c"}, + {file = "duckdb-1.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a80ebf52c03f81265b67720abc06a5c7770d08df82b30cabbe266012bd526229"}, + {file = "duckdb-1.1.1-cp39-cp39-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:402a42b992227ebb371a48681ce71b6d1c0661385454b269e6aa379f77a8a83a"}, + {file = "duckdb-1.1.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:a182d3cbf2e352aaddf392887331bbac460c473cbd55c65d6b6121ef7b43f174"}, + {file = "duckdb-1.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:fafc7d1ec4401787597a5f983d4ef8a9b0638f31e1674a458c57383911166f27"}, + {file = "duckdb-1.1.1.tar.gz", hash = "sha256:74fb07c1334a73e0ead1b0a03646d349921dac655762d916c8e45194c8218d30"}, ] [[package]] From d1bf1519cd4d3b190af040719ecd0b5c6662a746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Thu, 26 Sep 2024 12:52:07 -0600 Subject: [PATCH 04/16] Update xfail markers --- tests/contrib/test_batch_encoder_parquet.py | 13 +++++++++++-- tests/core/sinks/test_sql_sink.py | 1 - tests/core/test_connector_sql.py | 1 - 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/contrib/test_batch_encoder_parquet.py b/tests/contrib/test_batch_encoder_parquet.py index 11ef6faca..90af43619 100644 --- a/tests/contrib/test_batch_encoder_parquet.py +++ b/tests/contrib/test_batch_encoder_parquet.py @@ -2,6 +2,7 @@ from __future__ import annotations +import sys import typing as t import pytest @@ -13,7 +14,11 @@ from pathlib import Path -@pytest.mark.xfail +@pytest.mark.xfail( + sys.version_info >= (3, 13), + reason="Parquet not supported on Python 3.13 due to PyArrow incompatibility", + strict=True, +) def test_batcher(tmp_path: Path) -> None: root = tmp_path.joinpath("batches") root.mkdir() @@ -33,7 +38,11 @@ def test_batcher(tmp_path: Path) -> None: assert batches[0][0].endswith(".parquet") -@pytest.mark.xfail +@pytest.mark.xfail( + sys.version_info >= (3, 13), + reason="Parquet not supported on Python 3.13 due to PyArrow incompatibility", + strict=True, +) def test_batcher_gzip(tmp_path: Path) -> None: root = tmp_path.joinpath("batches") root.mkdir() diff --git a/tests/core/sinks/test_sql_sink.py b/tests/core/sinks/test_sql_sink.py index 746952a47..c20be40f6 100644 --- a/tests/core/sinks/test_sql_sink.py +++ b/tests/core/sinks/test_sql_sink.py @@ -22,7 +22,6 @@ class DuckDBTarget(SQLTarget): default_sink_class = DuckDBSink -@pytest.mark.xfail class TestDuckDBSink: @pytest.fixture def target(self) -> DuckDBTarget: diff --git a/tests/core/test_connector_sql.py b/tests/core/test_connector_sql.py index 71aa66684..f76f30525 100644 --- a/tests/core/test_connector_sql.py +++ b/tests/core/test_connector_sql.py @@ -296,7 +296,6 @@ def test_engine_json_serialization(self, connector: SQLConnector): ] -@pytest.mark.xfail class TestDuckDBConnector: @pytest.fixture def connector(self): From 8f516fb9c090659b8e888901ca996beecf6051e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Thu, 26 Sep 2024 13:11:38 -0600 Subject: [PATCH 05/16] Ignore SQLite `ResourceWarnings` --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index f1d8ed830..0a43fc1af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -178,6 +178,8 @@ filterwarnings = [ "ignore:ast.Str is deprecated:DeprecationWarning:simpleeval", # https://github.com/joblib/joblib/pull/1518 "ignore:Attribute n is deprecated:DeprecationWarning:joblib._utils", + # TODO: Address this SQLite warning in Python 3.13+ + "ignore::ResourceWarning", ] log_cli_level = "INFO" markers = [ From 3a8df2eb85201f764ebfb8ccf2505cd82e42bada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Thu, 26 Sep 2024 13:17:23 -0600 Subject: [PATCH 06/16] Update templates --- .../mapper-template/{{cookiecutter.mapper_id}}/pyproject.toml | 1 + .../mapper-template/{{cookiecutter.mapper_id}}/tox.ini | 4 ++-- .../tap-template/{{cookiecutter.tap_id}}/pyproject.toml | 1 + cookiecutter/tap-template/{{cookiecutter.tap_id}}/tox.ini | 4 ++-- .../target-template/{{cookiecutter.target_id}}/pyproject.toml | 1 + .../target-template/{{cookiecutter.target_id}}/tox.ini | 4 ++-- samples/sample_tap_dummy_json/pyproject.toml | 1 + samples/sample_tap_dummy_json/ruff.toml | 2 +- samples/sample_tap_dummy_json/tox.ini | 4 ++-- 9 files changed, 13 insertions(+), 9 deletions(-) diff --git a/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/pyproject.toml b/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/pyproject.toml index 40c8a9b17..49e88901e 100644 --- a/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/pyproject.toml +++ b/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/pyproject.toml @@ -20,6 +20,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] license = "Apache-2.0" {%- if cookiecutter.variant != "None (Skip)" %} diff --git a/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/tox.ini b/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/tox.ini index 59d5dd083..6a3e040b1 100644 --- a/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/tox.ini +++ b/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/tox.ini @@ -1,7 +1,7 @@ # This file can be used to customize tox tests as well as other test frameworks like flake8 and mypy [tox] -envlist = py{39,310,311,312} +envlist = py3{9,10,11,12,13} isolated_build = true [testenv] @@ -13,7 +13,7 @@ commands = [testenv:pytest] # Run the python tests. # To execute, run `tox -e pytest` -envlist = py{39,310,311,312} +envlist = py3{9,10,11,12,13} commands = poetry install -v poetry run pytest diff --git a/cookiecutter/tap-template/{{cookiecutter.tap_id}}/pyproject.toml b/cookiecutter/tap-template/{{cookiecutter.tap_id}}/pyproject.toml index 4163251a1..d223614b6 100644 --- a/cookiecutter/tap-template/{{cookiecutter.tap_id}}/pyproject.toml +++ b/cookiecutter/tap-template/{{cookiecutter.tap_id}}/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] license = "Apache-2.0" {%- if cookiecutter.variant != "None (Skip)" %} diff --git a/cookiecutter/tap-template/{{cookiecutter.tap_id}}/tox.ini b/cookiecutter/tap-template/{{cookiecutter.tap_id}}/tox.ini index 59d5dd083..6a3e040b1 100644 --- a/cookiecutter/tap-template/{{cookiecutter.tap_id}}/tox.ini +++ b/cookiecutter/tap-template/{{cookiecutter.tap_id}}/tox.ini @@ -1,7 +1,7 @@ # This file can be used to customize tox tests as well as other test frameworks like flake8 and mypy [tox] -envlist = py{39,310,311,312} +envlist = py3{9,10,11,12,13} isolated_build = true [testenv] @@ -13,7 +13,7 @@ commands = [testenv:pytest] # Run the python tests. # To execute, run `tox -e pytest` -envlist = py{39,310,311,312} +envlist = py3{9,10,11,12,13} commands = poetry install -v poetry run pytest diff --git a/cookiecutter/target-template/{{cookiecutter.target_id}}/pyproject.toml b/cookiecutter/target-template/{{cookiecutter.target_id}}/pyproject.toml index 0ede63ffb..aea30a6fc 100644 --- a/cookiecutter/target-template/{{cookiecutter.target_id}}/pyproject.toml +++ b/cookiecutter/target-template/{{cookiecutter.target_id}}/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] license = "Apache-2.0" {%- if cookiecutter.variant != "None (Skip)" %} diff --git a/cookiecutter/target-template/{{cookiecutter.target_id}}/tox.ini b/cookiecutter/target-template/{{cookiecutter.target_id}}/tox.ini index 59d5dd083..6a3e040b1 100644 --- a/cookiecutter/target-template/{{cookiecutter.target_id}}/tox.ini +++ b/cookiecutter/target-template/{{cookiecutter.target_id}}/tox.ini @@ -1,7 +1,7 @@ # This file can be used to customize tox tests as well as other test frameworks like flake8 and mypy [tox] -envlist = py{39,310,311,312} +envlist = py3{9,10,11,12,13} isolated_build = true [testenv] @@ -13,7 +13,7 @@ commands = [testenv:pytest] # Run the python tests. # To execute, run `tox -e pytest` -envlist = py{39,310,311,312} +envlist = py3{9,10,11,12,13} commands = poetry install -v poetry run pytest diff --git a/samples/sample_tap_dummy_json/pyproject.toml b/samples/sample_tap_dummy_json/pyproject.toml index c72347748..4542c6448 100644 --- a/samples/sample_tap_dummy_json/pyproject.toml +++ b/samples/sample_tap_dummy_json/pyproject.toml @@ -15,6 +15,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] license = "Apache-2.0" diff --git a/samples/sample_tap_dummy_json/ruff.toml b/samples/sample_tap_dummy_json/ruff.toml index dd2f13459..c6af4cfef 100644 --- a/samples/sample_tap_dummy_json/ruff.toml +++ b/samples/sample_tap_dummy_json/ruff.toml @@ -1,5 +1,5 @@ src = ["tap_dummyjson"] -target-version = "py38" +target-version = "py39" [lint] ignore = [ diff --git a/samples/sample_tap_dummy_json/tox.ini b/samples/sample_tap_dummy_json/tox.ini index 6be1c116a..8b89a4ef1 100644 --- a/samples/sample_tap_dummy_json/tox.ini +++ b/samples/sample_tap_dummy_json/tox.ini @@ -1,7 +1,7 @@ # This file can be used to customize tox tests as well as other test frameworks like flake8 and mypy [tox] -envlist = py{38,39,310,311,312} +envlist = py3{9,10,11,12,13} isolated_build = true [testenv] @@ -13,7 +13,7 @@ commands = [testenv:pytest] # Run the python tests. # To execute, run `tox -e pytest` -envlist = py{38,39,310,311,312} +envlist = py3{8,9,10,11,12,313} commands = poetry install -v poetry run pytest From 32a553a0e440417df0065e751bf00e5eee080e8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Thu, 26 Sep 2024 13:20:20 -0600 Subject: [PATCH 07/16] Update more xfail markers --- tests/samples/test_target_parquet.py | 7 ++++++- tests/samples/test_target_sqlite.py | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/samples/test_target_parquet.py b/tests/samples/test_target_parquet.py index 22fe4918d..5bdf33237 100644 --- a/tests/samples/test_target_parquet.py +++ b/tests/samples/test_target_parquet.py @@ -3,6 +3,7 @@ from __future__ import annotations import shutil +import sys import uuid from pathlib import Path @@ -23,7 +24,11 @@ ) -@pytest.mark.xfail +@pytest.mark.xfail( + sys.version_info >= (3, 13), + reason="Parquet not supported on Python 3.13 due to PyArrow incompatibility", + strict=True, +) class TestSampleTargetParquet(StandardTests): """Standard Target Tests.""" diff --git a/tests/samples/test_target_sqlite.py b/tests/samples/test_target_sqlite.py index 24b30f3d8..33566082f 100644 --- a/tests/samples/test_target_sqlite.py +++ b/tests/samples/test_target_sqlite.py @@ -4,6 +4,7 @@ import json import sqlite3 +import sys import typing as t from copy import deepcopy from io import StringIO @@ -367,7 +368,11 @@ def test_sqlite_process_batch_message( assert cursor.fetchone()[0] == 4 -@pytest.mark.xfail +@pytest.mark.xfail( + sys.version_info >= (3, 13), + reason="Parquet not supported on Python 3.13 due to PyArrow incompatibility", + strict=True, +) def test_sqlite_process_batch_parquet( sqlite_target_test_config: dict, sqlite_sample_target_batch: SQLiteTarget, From 8541ff863331a741057637ad5b79d433f912e247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Thu, 26 Sep 2024 13:23:21 -0600 Subject: [PATCH 08/16] There are some XPASS --- tests/samples/test_target_parquet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/samples/test_target_parquet.py b/tests/samples/test_target_parquet.py index 5bdf33237..3ec00352c 100644 --- a/tests/samples/test_target_parquet.py +++ b/tests/samples/test_target_parquet.py @@ -27,7 +27,7 @@ @pytest.mark.xfail( sys.version_info >= (3, 13), reason="Parquet not supported on Python 3.13 due to PyArrow incompatibility", - strict=True, + raises=NameError, ) class TestSampleTargetParquet(StandardTests): """Standard Target Tests.""" From 17de2c8a51882a764e71d49c2436a64cda001ea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Mon, 7 Oct 2024 19:03:51 -0600 Subject: [PATCH 09/16] Update max Py version in `--about` --- singer_sdk/about.py | 2 +- tests/core/test_about.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/singer_sdk/about.py b/singer_sdk/about.py index ab3062295..4b0cc1b8d 100644 --- a/singer_sdk/about.py +++ b/singer_sdk/about.py @@ -24,7 +24,7 @@ # Keep these in sync with the supported Python versions in pyproject.toml _PY_MIN_VERSION = 8 -_PY_MAX_VERSION = 12 +_PY_MAX_VERSION = 13 def _get_min_version(specifiers: SpecifierSet) -> int: diff --git a/tests/core/test_about.py b/tests/core/test_about.py index 70a445bb1..5d12fed19 100644 --- a/tests/core/test_about.py +++ b/tests/core/test_about.py @@ -106,8 +106,8 @@ def test_get_supported_pythons_sdk(): "specifiers,expected", [ (">=3.7,<3.12", ["3.7", "3.8", "3.9", "3.10", "3.11"]), - (">=3.7", ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]), - (">3.7", ["3.8", "3.9", "3.10", "3.11", "3.12"]), + (">=3.7", ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]), + (">3.7", ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]), (">3.7,<=3.11", ["3.8", "3.9", "3.10", "3.11"]), ], ) From 7f3cf758e922d4ecfa1fe0f78bc3e78e177242f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Tue, 8 Oct 2024 09:44:42 -0600 Subject: [PATCH 10/16] Use latest Python where possible --- .github/ISSUE_TEMPLATE/bug.yml | 1 + .github/workflows/api-changes.yml | 2 +- .github/workflows/codspeed.yml | 2 +- .github/workflows/cookiecutter-e2e.yml | 17 +++++------------ .github/workflows/test.yml | 17 ++++++++--------- .github/workflows/version_bump.yml | 3 +-- noxfile.py | 11 +++++++++-- 7 files changed, 26 insertions(+), 27 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index 61a0e143a..a6f131479 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -32,6 +32,7 @@ body: description: Version of Python you are using options: - "NA" + - "3.13" - "3.12" - "3.11" - "3.10" diff --git a/.github/workflows/api-changes.yml b/.github/workflows/api-changes.yml index c758517c4..e13f5d709 100644 --- a/.github/workflows/api-changes.yml +++ b/.github/workflows/api-changes.yml @@ -30,7 +30,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: 3.12 + python-version: 3.x - name: Install tools env: diff --git a/.github/workflows/codspeed.yml b/.github/workflows/codspeed.yml index 122e9d090..41497ffb6 100644 --- a/.github/workflows/codspeed.yml +++ b/.github/workflows/codspeed.yml @@ -30,7 +30,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.12 + python-version: 3.x architecture: x64 - name: Install poetry diff --git a/.github/workflows/cookiecutter-e2e.yml b/.github/workflows/cookiecutter-e2e.yml index 051d21d95..4e3030c19 100644 --- a/.github/workflows/cookiecutter-e2e.yml +++ b/.github/workflows/cookiecutter-e2e.yml @@ -24,14 +24,8 @@ env: jobs: lint: - name: Cookiecutter E2E Python ${{ matrix.python-version }} / ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: true - matrix: - include: - - { python-version: "3.12", os: "ubuntu-latest" } - + name: Cookiecutter E2E Python + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Upgrade pip @@ -52,8 +46,7 @@ jobs: - uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} - architecture: x64 + python-version: 3.x cache: 'pip' cache-dependency-path: 'poetry.lock' @@ -72,12 +65,12 @@ jobs: - name: Run Nox run: | - nox --python=${{ matrix.python-version }} --session=test_cookiecutter + nox --session=test_cookiecutter - uses: actions/upload-artifact@v4 if: always() with: - name: cookiecutter-${{ matrix.os }}-py${{ matrix.python-version }} + name: cookiecutter-ubuntu-latest-py3x path: | /tmp/tap-* /tmp/target-* diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5e10a926b..581c29ee9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,7 +41,7 @@ jobs: runs-on: ${{ matrix.os }} continue-on-error: true env: - NOXFORCEPYTHON: ${{ matrix.python-version }} + NOXPYTHON: ${{ matrix.python-version }} NOXSESSION: ${{ matrix.session }} strategy: fail-fast: false @@ -54,13 +54,13 @@ jobs: - "3.10" - "3.11" - "3.12" + - "3.13" 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" } + - { session: tests, python-version: "3.13", os: "ubuntu-latest", sqlalchemy: "1" } + - { session: doctest, python-version: "3.13", os: "ubuntu-latest", sqlalchemy: "2" } + - { session: mypy, python-version: "3.13", os: "ubuntu-latest", sqlalchemy: "2" } + - { session: deps, python-version: "3.13", os: "ubuntu-latest", sqlalchemy: "2" } steps: - uses: actions/checkout@v4 @@ -121,7 +121,6 @@ jobs: runs-on: ubuntu-latest if: ${{ !github.event.pull_request.head.repo.fork }} env: - NOXPYTHON: "3.12" NOXSESSION: tests SAMPLE_TAP_GITLAB_AUTH_TOKEN: ${{ secrets.SAMPLE_TAP_GITLAB_AUTH_TOKEN }} SAMPLE_TAP_GITLAB_GROUP_IDS: ${{ secrets.SAMPLE_TAP_GITLAB_GROUP_IDS }} @@ -145,7 +144,7 @@ jobs: - uses: actions/setup-python@v5 with: - python-version: ${{ env.NOXPYTHON }} + python-version: 3.x - name: Upgrade pip env: @@ -186,7 +185,7 @@ jobs: - uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.x' - name: Upgrade pip env: diff --git a/.github/workflows/version_bump.yml b/.github/workflows/version_bump.yml index 7f56cfba6..5d94ddf8d 100644 --- a/.github/workflows/version_bump.yml +++ b/.github/workflows/version_bump.yml @@ -47,8 +47,7 @@ jobs: - uses: actions/setup-python@v5 with: - python-version: "3.12" - architecture: x64 + python-version: "3.x" - name: Bump version id: cz-bump diff --git a/noxfile.py b/noxfile.py index e995396ae..bf3b2eab2 100644 --- a/noxfile.py +++ b/noxfile.py @@ -34,8 +34,15 @@ COOKIECUTTER_REPLAY_FILES = list(Path("./e2e-tests/cookiecutters").glob("*.json")) package = "singer_sdk" -python_versions = ["3.12", "3.11", "3.10", "3.9", "3.8"] -main_python_version = "3.12" +python_versions = [ + "3.13", + "3.12", + "3.11", + "3.10", + "3.9", + "3.8", +] +main_python_version = "3.13" locations = "singer_sdk", "tests", "noxfile.py", "docs/conf.py" nox.options.sessions = ( "mypy", From ab85c05c5259aba89763967c655c045503361d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Tue, 8 Oct 2024 09:51:12 -0600 Subject: [PATCH 11/16] Allow some sessions to run on any Python --- noxfile.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/noxfile.py b/noxfile.py index bf3b2eab2..cda821782 100644 --- a/noxfile.py +++ b/noxfile.py @@ -42,7 +42,6 @@ "3.9", "3.8", ] -main_python_version = "3.13" locations = "singer_sdk", "tests", "noxfile.py", "docs/conf.py" nox.options.sessions = ( "mypy", @@ -57,7 +56,7 @@ typing_dependencies = poetry_config["group"]["typing"]["dependencies"].keys() -@session(python=main_python_version) +@session() def mypy(session: Session) -> None: """Check types with mypy.""" args = session.posargs or ["singer_sdk"] @@ -112,7 +111,7 @@ def tests(session: Session) -> None: session.notify("coverage", posargs=[]) -@session(python=main_python_version) +@session() def benches(session: Session) -> None: """Run benchmarks.""" session.install(".[jwt,s3]") @@ -132,7 +131,7 @@ def benches(session: Session) -> None: ) -@session(name="deps", python=python_versions) +@session(name="deps") def dependencies(session: Session) -> None: """Check issues with dependencies.""" session.install(".[s3,testing]") @@ -140,7 +139,7 @@ def dependencies(session: Session) -> None: session.run("deptry", "singer_sdk", *session.posargs) -@session(python=main_python_version) +@session() def update_snapshots(session: Session) -> None: """Update pytest snapshots.""" args = session.posargs or ["-m", "snapshot"] @@ -165,7 +164,7 @@ def doctest(session: Session) -> None: session.run("pytest", "--xdoctest", *args) -@session(python=main_python_version) +@session() def coverage(session: Session) -> None: """Generate coverage report.""" args = session.posargs or ["report", "-m"] @@ -178,7 +177,7 @@ def coverage(session: Session) -> None: session.run("coverage", *args) -@session(name="docs", python=main_python_version) +@session(name="docs") def docs(session: Session) -> None: """Build the documentation.""" args = session.posargs or ["docs", "build", "-W"] @@ -194,7 +193,7 @@ def docs(session: Session) -> None: session.run("sphinx-build", *args) -@session(name="docs-serve", python=main_python_version) +@session(name="docs-serve") def docs_serve(session: Session) -> None: """Build the documentation.""" args = session.posargs or [ @@ -217,7 +216,7 @@ def docs_serve(session: Session) -> None: @nox.parametrize("replay_file_path", COOKIECUTTER_REPLAY_FILES) -@session(python=main_python_version) +@session() def test_cookiecutter(session: Session, replay_file_path: str) -> None: """Uses the tap template to build an empty cookiecutter. From c2c04e9b4ac11946714a4d448efb2bb64bfa5c2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Tue, 8 Oct 2024 09:52:14 -0600 Subject: [PATCH 12/16] Fix external tests --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 581c29ee9..c7fa97546 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -121,6 +121,7 @@ jobs: runs-on: ubuntu-latest if: ${{ !github.event.pull_request.head.repo.fork }} env: + NOXPYTHON: "3.12" NOXSESSION: tests SAMPLE_TAP_GITLAB_AUTH_TOKEN: ${{ secrets.SAMPLE_TAP_GITLAB_AUTH_TOKEN }} SAMPLE_TAP_GITLAB_GROUP_IDS: ${{ secrets.SAMPLE_TAP_GITLAB_GROUP_IDS }} @@ -144,7 +145,7 @@ jobs: - uses: actions/setup-python@v5 with: - python-version: 3.x + python-version: ${{ env.NOXPYTHON }} - name: Upgrade pip env: From e1c014abcd45e3a2b836703fec1e3d35f2b678c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Tue, 8 Oct 2024 09:56:29 -0600 Subject: [PATCH 13/16] Restore 3.12 as main Python version --- noxfile.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/noxfile.py b/noxfile.py index cda821782..c61367133 100644 --- a/noxfile.py +++ b/noxfile.py @@ -42,6 +42,7 @@ "3.9", "3.8", ] +main_python_version = "3.12" locations = "singer_sdk", "tests", "noxfile.py", "docs/conf.py" nox.options.sessions = ( "mypy", @@ -56,7 +57,7 @@ typing_dependencies = poetry_config["group"]["typing"]["dependencies"].keys() -@session() +@session(python=main_python_version) def mypy(session: Session) -> None: """Check types with mypy.""" args = session.posargs or ["singer_sdk"] @@ -111,7 +112,7 @@ def tests(session: Session) -> None: session.notify("coverage", posargs=[]) -@session() +@session(python=main_python_version) def benches(session: Session) -> None: """Run benchmarks.""" session.install(".[jwt,s3]") @@ -131,7 +132,7 @@ def benches(session: Session) -> None: ) -@session(name="deps") +@session(name="deps", python=main_python_version) def dependencies(session: Session) -> None: """Check issues with dependencies.""" session.install(".[s3,testing]") @@ -139,7 +140,7 @@ def dependencies(session: Session) -> None: session.run("deptry", "singer_sdk", *session.posargs) -@session() +@session(python=main_python_version) def update_snapshots(session: Session) -> None: """Update pytest snapshots.""" args = session.posargs or ["-m", "snapshot"] @@ -164,7 +165,7 @@ def doctest(session: Session) -> None: session.run("pytest", "--xdoctest", *args) -@session() +@session(python=main_python_version) def coverage(session: Session) -> None: """Generate coverage report.""" args = session.posargs or ["report", "-m"] @@ -177,7 +178,7 @@ def coverage(session: Session) -> None: session.run("coverage", *args) -@session(name="docs") +@session(name="docs", python=main_python_version) def docs(session: Session) -> None: """Build the documentation.""" args = session.posargs or ["docs", "build", "-W"] @@ -193,7 +194,7 @@ def docs(session: Session) -> None: session.run("sphinx-build", *args) -@session(name="docs-serve") +@session(name="docs-serve", python=main_python_version) def docs_serve(session: Session) -> None: """Build the documentation.""" args = session.posargs or [ @@ -216,7 +217,7 @@ def docs_serve(session: Session) -> None: @nox.parametrize("replay_file_path", COOKIECUTTER_REPLAY_FILES) -@session() +@session(python=main_python_version) def test_cookiecutter(session: Session, replay_file_path: str) -> None: """Uses the tap template to build an empty cookiecutter. From 63558aa5faa55e39e80dd73ca46513dc703e1f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Tue, 8 Oct 2024 09:58:05 -0600 Subject: [PATCH 14/16] Let mypy and deps run --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c7fa97546..95571ffe3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,8 +59,8 @@ jobs: include: - { session: tests, python-version: "3.13", os: "ubuntu-latest", sqlalchemy: "1" } - { session: doctest, python-version: "3.13", os: "ubuntu-latest", sqlalchemy: "2" } - - { session: mypy, python-version: "3.13", os: "ubuntu-latest", sqlalchemy: "2" } - - { session: deps, python-version: "3.13", 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" } steps: - uses: actions/checkout@v4 From a03bae8ba99d4cebb33cfa3373e52e79ece8c2fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Wed, 16 Oct 2024 23:30:47 -0600 Subject: [PATCH 15/16] Use default latest Python for extra sessions --- .github/workflows/test.yml | 22 ++++++++++++---------- noxfile.py | 17 ++++++++--------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 29432a002..d1aafa944 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,11 +37,10 @@ env: jobs: tests: - name: "Test on ${{ matrix.python-version }} (${{ matrix.session }}) / ${{ matrix.os }} / SQLAlchemy: ${{ matrix.sqlalchemy }}" + name: "Test on ${{ matrix.python-version || '3.x' }} (${{ matrix.session }}) / ${{ matrix.os }} / SQLAlchemy: ${{ matrix.sqlalchemy }}" runs-on: ${{ matrix.os }} continue-on-error: true env: - NOXPYTHON: ${{ matrix.python-version }} NOXSESSION: ${{ matrix.session }} strategy: fail-fast: false @@ -57,10 +56,10 @@ jobs: - "3.13" sqlalchemy: ["2"] include: - - { session: tests, python-version: "3.13", os: "ubuntu-latest", sqlalchemy: "1" } - - { session: doctest, python-version: "3.13", 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" } + - { session: tests, os: "ubuntu-latest", sqlalchemy: "1" } + - { session: doctest, os: "ubuntu-latest", sqlalchemy: "2" } + - { session: mypy, os: "ubuntu-latest", sqlalchemy: "2" } + - { session: deps, os: "ubuntu-latest", sqlalchemy: "2" } steps: - uses: actions/checkout@v4 @@ -68,8 +67,9 @@ jobs: fetch-depth: 0 - uses: actions/setup-python@v5 + id: setup-python with: - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.python-version || '3.x' }} allow-prereleases: true - name: Upgrade pip @@ -94,6 +94,7 @@ jobs: - name: Run Nox env: + NOXFORCEPYTHON: ${{ steps.setup-python.outputs.python-version }} SQLALCHEMY_VERSION: ${{ matrix.sqlalchemy }} PIP_PRE: "1" UV_PRERELEASE: allow @@ -112,7 +113,6 @@ jobs: runs-on: ubuntu-latest if: ${{ !github.event.pull_request.head.repo.fork }} env: - NOXPYTHON: "3.12" NOXSESSION: tests SAMPLE_TAP_GITLAB_AUTH_TOKEN: ${{ secrets.SAMPLE_TAP_GITLAB_AUTH_TOKEN }} SAMPLE_TAP_GITLAB_GROUP_IDS: ${{ secrets.SAMPLE_TAP_GITLAB_GROUP_IDS }} @@ -125,8 +125,9 @@ jobs: fetch-depth: 0 - uses: actions/setup-python@v5 + id: setup-python with: - python-version: ${{ env.NOXPYTHON }} + python-version: 3.x - name: Upgrade pip env: @@ -144,6 +145,7 @@ jobs: - name: Run Nox env: + NOXFORCEPYTHON: ${{ steps.setup-python.outputs.python-version }} PIP_PRE: "1" UV_PRERELEASE: allow run: | @@ -159,7 +161,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.x' + python-version: 3.x - name: Upgrade pip env: diff --git a/noxfile.py b/noxfile.py index 3a94fe9fa..99f87c9eb 100644 --- a/noxfile.py +++ b/noxfile.py @@ -32,7 +32,6 @@ "3.9", "3.8", ] -main_python_version = "3.12" locations = "singer_sdk", "tests", "noxfile.py", "docs/conf.py" nox.options.sessions = ( "mypy", @@ -47,7 +46,7 @@ typing_dependencies = poetry_config["group"]["typing"]["dependencies"].keys() -@nox.session(python=main_python_version) +@nox.session() def mypy(session: nox.Session) -> None: """Check types with mypy.""" args = session.posargs or ["singer_sdk"] @@ -98,7 +97,7 @@ def tests(session: nox.Session) -> None: session.notify("coverage", posargs=[]) -@nox.session(python=main_python_version) +@nox.session() def benches(session: nox.Session) -> None: """Run benchmarks.""" session.install(".[jwt,s3]") @@ -114,7 +113,7 @@ def benches(session: nox.Session) -> None: ) -@nox.session(name="deps", python=main_python_version) +@nox.session(name="deps") def dependencies(session: nox.Session) -> None: """Check issues with dependencies.""" session.install(".[s3,testing]") @@ -122,7 +121,7 @@ def dependencies(session: nox.Session) -> None: session.run("deptry", "singer_sdk", *session.posargs) -@nox.session(python=main_python_version) +@nox.session() def update_snapshots(session: nox.Session) -> None: """Update pytest snapshots.""" args = session.posargs or ["-m", "snapshot"] @@ -147,7 +146,7 @@ def doctest(session: nox.Session) -> None: session.run("pytest", "--xdoctest", *args) -@nox.session(python=main_python_version) +@nox.session() def coverage(session: nox.Session) -> None: """Generate coverage report.""" args = session.posargs or ["report", "-m"] @@ -160,7 +159,7 @@ def coverage(session: nox.Session) -> None: session.run("coverage", *args) -@nox.session(name="docs", python=main_python_version) +@nox.session(name="docs") def docs(session: nox.Session) -> None: """Build the documentation.""" args = session.posargs or ["docs", "build", "-W"] @@ -176,7 +175,7 @@ def docs(session: nox.Session) -> None: session.run("sphinx-build", *args) -@nox.session(name="docs-serve", python=main_python_version) +@nox.session(name="docs-serve") def docs_serve(session: nox.Session) -> None: """Build the documentation.""" args = session.posargs or [ @@ -199,7 +198,7 @@ def docs_serve(session: nox.Session) -> None: @nox.parametrize("replay_file_path", COOKIECUTTER_REPLAY_FILES) -@nox.session(python=main_python_version) +@nox.session() def test_cookiecutter(session: nox.Session, replay_file_path: str) -> None: """Uses the tap template to build an empty cookiecutter. From c76b915a7cb23f792b2ff71ee06f3b69fb270abb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Wed, 16 Oct 2024 23:58:18 -0600 Subject: [PATCH 16/16] Revert "Use default latest Python for extra sessions" This reverts commit a03bae8ba99d4cebb33cfa3373e52e79ece8c2fd. --- .github/workflows/test.yml | 22 ++++++++++------------ noxfile.py | 17 +++++++++-------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d1aafa944..29432a002 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,10 +37,11 @@ env: jobs: tests: - name: "Test on ${{ matrix.python-version || '3.x' }} (${{ matrix.session }}) / ${{ matrix.os }} / SQLAlchemy: ${{ matrix.sqlalchemy }}" + name: "Test on ${{ matrix.python-version }} (${{ matrix.session }}) / ${{ matrix.os }} / SQLAlchemy: ${{ matrix.sqlalchemy }}" runs-on: ${{ matrix.os }} continue-on-error: true env: + NOXPYTHON: ${{ matrix.python-version }} NOXSESSION: ${{ matrix.session }} strategy: fail-fast: false @@ -56,10 +57,10 @@ jobs: - "3.13" sqlalchemy: ["2"] include: - - { session: tests, os: "ubuntu-latest", sqlalchemy: "1" } - - { session: doctest, os: "ubuntu-latest", sqlalchemy: "2" } - - { session: mypy, os: "ubuntu-latest", sqlalchemy: "2" } - - { session: deps, os: "ubuntu-latest", sqlalchemy: "2" } + - { session: tests, python-version: "3.13", os: "ubuntu-latest", sqlalchemy: "1" } + - { session: doctest, python-version: "3.13", 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" } steps: - uses: actions/checkout@v4 @@ -67,9 +68,8 @@ jobs: fetch-depth: 0 - uses: actions/setup-python@v5 - id: setup-python with: - python-version: ${{ matrix.python-version || '3.x' }} + python-version: ${{ matrix.python-version }} allow-prereleases: true - name: Upgrade pip @@ -94,7 +94,6 @@ jobs: - name: Run Nox env: - NOXFORCEPYTHON: ${{ steps.setup-python.outputs.python-version }} SQLALCHEMY_VERSION: ${{ matrix.sqlalchemy }} PIP_PRE: "1" UV_PRERELEASE: allow @@ -113,6 +112,7 @@ jobs: runs-on: ubuntu-latest if: ${{ !github.event.pull_request.head.repo.fork }} env: + NOXPYTHON: "3.12" NOXSESSION: tests SAMPLE_TAP_GITLAB_AUTH_TOKEN: ${{ secrets.SAMPLE_TAP_GITLAB_AUTH_TOKEN }} SAMPLE_TAP_GITLAB_GROUP_IDS: ${{ secrets.SAMPLE_TAP_GITLAB_GROUP_IDS }} @@ -125,9 +125,8 @@ jobs: fetch-depth: 0 - uses: actions/setup-python@v5 - id: setup-python with: - python-version: 3.x + python-version: ${{ env.NOXPYTHON }} - name: Upgrade pip env: @@ -145,7 +144,6 @@ jobs: - name: Run Nox env: - NOXFORCEPYTHON: ${{ steps.setup-python.outputs.python-version }} PIP_PRE: "1" UV_PRERELEASE: allow run: | @@ -161,7 +159,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.x + python-version: '3.x' - name: Upgrade pip env: diff --git a/noxfile.py b/noxfile.py index 99f87c9eb..3a94fe9fa 100644 --- a/noxfile.py +++ b/noxfile.py @@ -32,6 +32,7 @@ "3.9", "3.8", ] +main_python_version = "3.12" locations = "singer_sdk", "tests", "noxfile.py", "docs/conf.py" nox.options.sessions = ( "mypy", @@ -46,7 +47,7 @@ typing_dependencies = poetry_config["group"]["typing"]["dependencies"].keys() -@nox.session() +@nox.session(python=main_python_version) def mypy(session: nox.Session) -> None: """Check types with mypy.""" args = session.posargs or ["singer_sdk"] @@ -97,7 +98,7 @@ def tests(session: nox.Session) -> None: session.notify("coverage", posargs=[]) -@nox.session() +@nox.session(python=main_python_version) def benches(session: nox.Session) -> None: """Run benchmarks.""" session.install(".[jwt,s3]") @@ -113,7 +114,7 @@ def benches(session: nox.Session) -> None: ) -@nox.session(name="deps") +@nox.session(name="deps", python=main_python_version) def dependencies(session: nox.Session) -> None: """Check issues with dependencies.""" session.install(".[s3,testing]") @@ -121,7 +122,7 @@ def dependencies(session: nox.Session) -> None: session.run("deptry", "singer_sdk", *session.posargs) -@nox.session() +@nox.session(python=main_python_version) def update_snapshots(session: nox.Session) -> None: """Update pytest snapshots.""" args = session.posargs or ["-m", "snapshot"] @@ -146,7 +147,7 @@ def doctest(session: nox.Session) -> None: session.run("pytest", "--xdoctest", *args) -@nox.session() +@nox.session(python=main_python_version) def coverage(session: nox.Session) -> None: """Generate coverage report.""" args = session.posargs or ["report", "-m"] @@ -159,7 +160,7 @@ def coverage(session: nox.Session) -> None: session.run("coverage", *args) -@nox.session(name="docs") +@nox.session(name="docs", python=main_python_version) def docs(session: nox.Session) -> None: """Build the documentation.""" args = session.posargs or ["docs", "build", "-W"] @@ -175,7 +176,7 @@ def docs(session: nox.Session) -> None: session.run("sphinx-build", *args) -@nox.session(name="docs-serve") +@nox.session(name="docs-serve", python=main_python_version) def docs_serve(session: nox.Session) -> None: """Build the documentation.""" args = session.posargs or [ @@ -198,7 +199,7 @@ def docs_serve(session: nox.Session) -> None: @nox.parametrize("replay_file_path", COOKIECUTTER_REPLAY_FILES) -@nox.session() +@nox.session(python=main_python_version) def test_cookiecutter(session: nox.Session, replay_file_path: str) -> None: """Uses the tap template to build an empty cookiecutter.