From 86b18f4426bf6cd321366972ef03a77b19d0890e Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Wed, 15 Oct 2025 15:57:03 -0400 Subject: [PATCH 01/16] feat: adds support for Python runtime 3.14 --- .github/sync-repo-settings.yaml | 1 + .github/workflows/unittest.yml | 2 +- CONTRIBUTING.rst | 4 +++- noxfile.py | 2 +- owlbot.py | 2 +- pyproject.toml | 3 +++ testing/constraints-3.14.txt | 2 ++ 7 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 testing/constraints-3.14.txt diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 1e61b4d65..ac91806eb 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -19,6 +19,7 @@ branchProtectionRules: - 'Samples - Python 3.11' - 'Samples - Python 3.12' - 'Samples - Python 3.13' + - 'Samples - Python 3.14' - pattern: v2 requiresLinearHistory: true requiresCodeOwnerReviews: true diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 24c9ddbaf..99f3416d4 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ['3.9', '3.11', '3.12', '3.13'] + python: ['3.9', '3.11', '3.12', '3.13', '3.14'] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index b2993768b..3f8653f4b 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -22,7 +22,7 @@ In order to add a feature: documentation. - The feature must work fully on the following CPython versions: - 3.9, 3.10, 3.11, 3.12 and 3.13 on both UNIX and Windows. + 3.9, 3.10, 3.11, 3.12, 3.13 and 3.14 on both UNIX and Windows. - The feature must not add unnecessary dependencies (where "unnecessary" is of course subjective, but new dependencies should @@ -226,12 +226,14 @@ We support: - `Python 3.11`_ - `Python 3.12`_ - `Python 3.13`_ +- `Python 3.14`_ .. _Python 3.9: https://docs.python.org/3.9/ .. _Python 3.10: https://docs.python.org/3.10/ .. _Python 3.11: https://docs.python.org/3.11/ .. _Python 3.12: https://docs.python.org/3.12/ .. _Python 3.13: https://docs.python.org/3.13/ +.. _Python 3.14: https://docs.python.org/3.14/ Supported versions can be found in our ``noxfile.py`` `config`_. diff --git a/noxfile.py b/noxfile.py index eb79c238d..3119ae6c9 100644 --- a/noxfile.py +++ b/noxfile.py @@ -39,7 +39,7 @@ DEFAULT_PYTHON_VERSION = "3.9" SYSTEM_TEST_PYTHON_VERSIONS = ["3.9", "3.11", "3.12", "3.13"] -UNIT_TEST_PYTHON_VERSIONS = ["3.9", "3.11", "3.12", "3.13"] +UNIT_TEST_PYTHON_VERSIONS = ["3.9", "3.11", "3.12", "3.13", "3.14"] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() diff --git a/owlbot.py b/owlbot.py index 80cf9d6e3..bd694180f 100644 --- a/owlbot.py +++ b/owlbot.py @@ -56,7 +56,7 @@ "pandas": "https://pandas.pydata.org/pandas-docs/stable/", }, system_test_python_versions=["3.9", "3.13"], - unit_test_python_versions=["3.9", "3.10", "3.11", "3.12", "3.13"], + unit_test_python_versions=["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"], default_python_version="3.9", ) diff --git a/pyproject.toml b/pyproject.toml index 1c6ec1f77..a0e356b34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,6 +38,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "Topic :: Internet", ] @@ -69,6 +70,7 @@ bqstorage = [ # https://github.com/grpc/grpc/pull/15254 "grpcio >= 1.47.0, < 2.0.0", "grpcio >= 1.49.1, < 2.0.0; python_version >= '3.11'", + "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "pyarrow >= 4.0.0", ] pandas = [ @@ -76,6 +78,7 @@ pandas = [ "pandas-gbq >= 0.26.1", "grpcio >= 1.47.0, < 2.0.0", "grpcio >= 1.49.1, < 2.0.0; python_version >= '3.11'", + "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "pyarrow >= 3.0.0", "db-dtypes >= 1.0.4, < 2.0.0", ] diff --git a/testing/constraints-3.14.txt b/testing/constraints-3.14.txt new file mode 100644 index 000000000..6bd20f5fb --- /dev/null +++ b/testing/constraints-3.14.txt @@ -0,0 +1,2 @@ +# Constraints for Python 3.14 +grpcio >= 1.75.1 From c5a25e840cf85b9e5ba7dbbde2ebf4167307f2ce Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Thu, 16 Oct 2025 07:19:38 -0400 Subject: [PATCH 02/16] adds step to install gdal --- .github/workflows/unittest.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 99f3416d4..18f700a12 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -21,6 +21,8 @@ jobs: run: | python -m pip install --upgrade setuptools pip wheel python -m pip install nox + - name: Install GDAL + run: sudo apt-get update && sudo apt-get install -y libgdal-dev - name: Run unit tests env: COVERAGE_FILE: .coverage-${{ matrix.python }} From 879e60d4863fdc234db4861209b49f854fea636d Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Thu, 16 Oct 2025 07:27:25 -0400 Subject: [PATCH 03/16] adds files required by pyarrow --- .github/workflows/unittest.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 18f700a12..ea9d37741 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -21,8 +21,10 @@ jobs: run: | python -m pip install --upgrade setuptools pip wheel python -m pip install nox - - name: Install GDAL - run: sudo apt-get update && sudo apt-get install -y libgdal-dev + - name: Install GDAL and Arrow + run: | + sudo apt-get update + sudo apt-get install -y libgdal-dev libarrow-dev libarrow-dataset-dev - name: Run unit tests env: COVERAGE_FILE: .coverage-${{ matrix.python }} From 669a9f9770954a0cd621a598528fdcab19530787 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Thu, 16 Oct 2025 07:30:30 -0400 Subject: [PATCH 04/16] adds repo required by pyarrow --- .github/workflows/unittest.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index ea9d37741..1163e4e5a 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -23,6 +23,9 @@ jobs: python -m pip install nox - name: Install GDAL and Arrow run: | + sudo apt-get update + sudo apt-get install -y -V ca-certificates lsb-release wget software-properties-common + wget -O - https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source.list | sudo tee /etc/apt/sources.list.d/apache-arrow.list sudo apt-get update sudo apt-get install -y libgdal-dev libarrow-dev libarrow-dataset-dev - name: Run unit tests From 73171fd85d8a2958bc89bb696c423f23123c71c1 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Thu, 16 Oct 2025 07:33:49 -0400 Subject: [PATCH 05/16] corrects url to repo required by pyarrow --- .github/workflows/unittest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 1163e4e5a..d0a2752b4 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -25,7 +25,7 @@ jobs: run: | sudo apt-get update sudo apt-get install -y -V ca-certificates lsb-release wget software-properties-common - wget -O - https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source.list | sudo tee /etc/apt/sources.list.d/apache-arrow.list + wget -O - https://apache.jfrog.io/artifactory/arrow/$(lsb_release -sc)/apache-arrow-apt-source.list | sudo tee /etc/apt/sources.list.d/apache-arrow.list sudo apt-get update sudo apt-get install -y libgdal-dev libarrow-dev libarrow-dataset-dev - name: Run unit tests From c2b961c387b56351aa034ca14985b2a6f94a1343 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Thu, 16 Oct 2025 11:06:37 -0400 Subject: [PATCH 06/16] testing a theory with a conditional --- .github/workflows/unittest.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index d0a2752b4..3843bbc9b 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -22,6 +22,7 @@ jobs: python -m pip install --upgrade setuptools pip wheel python -m pip install nox - name: Install GDAL and Arrow + if: matrix.python != '3.14' run: | sudo apt-get update sudo apt-get install -y -V ca-certificates lsb-release wget software-properties-common From 63d61aa8e974852c6bd2751c2a3f53bfe2ffe126 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Thu, 16 Oct 2025 11:18:29 -0400 Subject: [PATCH 07/16] testing a theory with a conditional version of ubuntu --- .github/workflows/unittest.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 3843bbc9b..a1b65fbe3 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -5,8 +5,8 @@ on: name: unittest jobs: unit: - # Use `ubuntu-latest` runner. - runs-on: ubuntu-latest + # Use `ubuntu-22.04` runner. + runs-on: ubuntu-22.04 strategy: matrix: python: ['3.9', '3.11', '3.12', '3.13', '3.14'] @@ -22,7 +22,6 @@ jobs: python -m pip install --upgrade setuptools pip wheel python -m pip install nox - name: Install GDAL and Arrow - if: matrix.python != '3.14' run: | sudo apt-get update sudo apt-get install -y -V ca-certificates lsb-release wget software-properties-common From 27c78e0a240bcdc82316d6a1aaa6ed2dc401e320 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Thu, 16 Oct 2025 11:22:31 -0400 Subject: [PATCH 08/16] testing a new approach to installing arrow --- .github/workflows/unittest.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index a1b65fbe3..35a883576 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -24,8 +24,9 @@ jobs: - name: Install GDAL and Arrow run: | sudo apt-get update - sudo apt-get install -y -V ca-certificates lsb-release wget software-properties-common - wget -O - https://apache.jfrog.io/artifactory/arrow/$(lsb_release -sc)/apache-arrow-apt-source.list | sudo tee /etc/apt/sources.list.d/apache-arrow.list + sudo apt-get install -y -V ca-certificates lsb-release wget software-properties-common gpg + wget -qO- https://apache.jfrog.io/artifactory/arrow/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/apache-arrow-keyring.gpg + echo "deb [signed-by=/usr/share/keyrings/apache-arrow-keyring.gpg] https://apache.jfrog.io/artifactory/arrow/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/apache-arrow.list sudo apt-get update sudo apt-get install -y libgdal-dev libarrow-dev libarrow-dataset-dev - name: Run unit tests From 6a0fb4b7317b4e0c4b7ff09092fef8d41cf6063a Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Thu, 16 Oct 2025 11:26:32 -0400 Subject: [PATCH 09/16] testing a new approach to dearmoring the key --- .github/workflows/unittest.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 35a883576..1faa0fc44 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -25,7 +25,8 @@ jobs: run: | sudo apt-get update sudo apt-get install -y -V ca-certificates lsb-release wget software-properties-common gpg - wget -qO- https://apache.jfrog.io/artifactory/arrow/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/apache-arrow-keyring.gpg + wget https://apache.jfrog.io/artifactory/arrow/gpg.key -O apache-arrow-gpg.key + cat apache-arrow-gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/apache-arrow-keyring.gpg echo "deb [signed-by=/usr/share/keyrings/apache-arrow-keyring.gpg] https://apache.jfrog.io/artifactory/arrow/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/apache-arrow.list sudo apt-get update sudo apt-get install -y libgdal-dev libarrow-dev libarrow-dataset-dev From 7d1cd5fdb6c81f9d7ff5fd2bec9826c9d7dac26e Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Thu, 16 Oct 2025 11:43:42 -0400 Subject: [PATCH 10/16] back to the basics --- .github/workflows/unittest.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 1faa0fc44..72fd71b28 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -21,15 +21,6 @@ jobs: run: | python -m pip install --upgrade setuptools pip wheel python -m pip install nox - - name: Install GDAL and Arrow - run: | - sudo apt-get update - sudo apt-get install -y -V ca-certificates lsb-release wget software-properties-common gpg - wget https://apache.jfrog.io/artifactory/arrow/gpg.key -O apache-arrow-gpg.key - cat apache-arrow-gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/apache-arrow-keyring.gpg - echo "deb [signed-by=/usr/share/keyrings/apache-arrow-keyring.gpg] https://apache.jfrog.io/artifactory/arrow/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/apache-arrow.list - sudo apt-get update - sudo apt-get install -y libgdal-dev libarrow-dev libarrow-dataset-dev - name: Run unit tests env: COVERAGE_FILE: .coverage-${{ matrix.python }} From 6c5859e257f0e328b6f829aafe543b9cab890817 Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Thu, 16 Oct 2025 12:32:22 -0400 Subject: [PATCH 11/16] trying a conditional again. --- .github/workflows/unittest.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 72fd71b28..56106a193 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -6,7 +6,7 @@ name: unittest jobs: unit: # Use `ubuntu-22.04` runner. - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest strategy: matrix: python: ['3.9', '3.11', '3.12', '3.13', '3.14'] @@ -22,6 +22,7 @@ jobs: python -m pip install --upgrade setuptools pip wheel python -m pip install nox - name: Run unit tests + if: matrix.python != '3.14' env: COVERAGE_FILE: .coverage-${{ matrix.python }} run: | @@ -38,7 +39,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ['3.9', '3.13'] + python: ['3.9', '3.14'] steps: - name: Checkout uses: actions/checkout@v4 From 20e68b2b5c84ce6f431046644cfd2d2ffc8c9d4e Mon Sep 17 00:00:00 2001 From: chalmer lowe Date: Thu, 16 Oct 2025 12:46:09 -0400 Subject: [PATCH 12/16] adds explanatory comment resets ubuntu version to latest --- .github/workflows/unittest.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 56106a193..c2b9a54f0 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -22,6 +22,11 @@ jobs: python -m pip install --upgrade setuptools pip wheel python -m pip install nox - name: Run unit tests + + # TODO 3.14 is not yet supported by pyarrow. See + # https://github.com/googleapis/google-cloud-python/issues/14686 + # https://github.com/apache/arrow/issues/47438 + # Reinstate running tests with 3.14 once this bug is fixed if: matrix.python != '3.14' env: COVERAGE_FILE: .coverage-${{ matrix.python }} From bffbc5ea457512adf5ce20d0a8a5292bc307e0ac Mon Sep 17 00:00:00 2001 From: Chalmer Lowe Date: Thu, 16 Oct 2025 13:29:06 -0400 Subject: [PATCH 13/16] Apply suggestion from @chalmerlowe --- .github/workflows/unittest.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index c2b9a54f0..15e003102 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -5,7 +5,6 @@ on: name: unittest jobs: unit: - # Use `ubuntu-22.04` runner. runs-on: ubuntu-latest strategy: matrix: From 7a85e3045e36a021009926fa50bbd513d47e0d09 Mon Sep 17 00:00:00 2001 From: Chalmer Lowe Date: Mon, 20 Oct 2025 07:18:09 -0400 Subject: [PATCH 14/16] Apply suggestion from @chalmerlowe --- .github/workflows/unittest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 15e003102..38f0308e9 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -22,7 +22,7 @@ jobs: python -m pip install nox - name: Run unit tests - # TODO 3.14 is not yet supported by pyarrow. See + # TODO (https://b.corp.google.com/issues/450370502) 3.14 is not yet supported by pyarrow. See # https://github.com/googleapis/google-cloud-python/issues/14686 # https://github.com/apache/arrow/issues/47438 # Reinstate running tests with 3.14 once this bug is fixed From 6a1986ded22c4882dc4530e1242b204ddfc774eb Mon Sep 17 00:00:00 2001 From: Chalmer Lowe Date: Mon, 20 Oct 2025 07:19:06 -0400 Subject: [PATCH 15/16] Apply suggestion from @chalmerlowe --- noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index 3119ae6c9..2457382fb 100644 --- a/noxfile.py +++ b/noxfile.py @@ -39,7 +39,7 @@ DEFAULT_PYTHON_VERSION = "3.9" SYSTEM_TEST_PYTHON_VERSIONS = ["3.9", "3.11", "3.12", "3.13"] -UNIT_TEST_PYTHON_VERSIONS = ["3.9", "3.11", "3.12", "3.13", "3.14"] +UNIT_TEST_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute() From 3429322ba0a8e7b8fc60eed8232e3caf08d6738c Mon Sep 17 00:00:00 2001 From: Chalmer Lowe Date: Mon, 20 Oct 2025 10:23:25 -0400 Subject: [PATCH 16/16] Apply suggestion from @chalmerlowe --- .github/workflows/unittest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 38f0308e9..f6b92547e 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ['3.9', '3.11', '3.12', '3.13', '3.14'] + python: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] steps: - name: Checkout uses: actions/checkout@v4