Skip to content

Commit ca6321d

Browse files
committed
tests: add testing for Python 3.15
1 parent 06c1f05 commit ca6321d

52 files changed

Lines changed: 124 additions & 75 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/unittest.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
strategy:
8484
fail-fast: true
8585
matrix:
86-
python: ['3.10', "3.11", "3.12", "3.13", "3.14"]
86+
python: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
8787
package_shard: ${{ fromJson(needs.initialize.outputs.matrix) }}
8888
name: ${{ matrix.package_shard.is_sharded && format('unit ({0}, {1})', matrix.python, matrix.package_shard.name) || format('unit ({0})', matrix.python) }}
8989
steps:
@@ -100,10 +100,38 @@ jobs:
100100
with:
101101
python-version: ${{ matrix.python }}
102102
cache: 'pip'
103+
allow-prereleases: true
104+
- name: Setup uv
105+
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5
106+
with:
107+
enable-cache: true
108+
cache-dependency-glob: 'packages/**/testing/constraints*.txt'
103109
- name: Install nox
104110
run: |
105111
python -m pip install --upgrade setuptools pip wheel
106112
python -m pip install nox uv
113+
- name: Run unit tests
114+
uv pip install --system nox nox-uv
115+
# Caches compiled wheels locally to prevent building heavy libraries
116+
# such as grpcio, which we build from scratch on every run for Python 3.15+.
117+
# Follow https://github.com/grpc/grpc/issues/41010 for updates.
118+
- name: Cache Built Python 3.15 Wheels
119+
if: matrix.python == '3.15'
120+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
121+
with:
122+
path: .uv-wheel-cache
123+
key: ${{ runner.os }}-uv-wheels-3.15-${{ hashFiles('packages/**/testing/constraints*.txt') }}
124+
restore-keys: |
125+
${{ runner.os }}-uv-wheels-3.15-
126+
# Pre-cache heavy dependencies sequentially before running parallel tests
127+
- name: Pre-cache heavy dependencies (grpcio)
128+
if: matrix.python == '3.15'
129+
run: |
130+
# Create the directory so uv doesn't crash if there is a `cache miss`
131+
mkdir -p .uv-wheel-cache
132+
# Download and compile grpcio sequentially so that parallel test workers
133+
# immediately hit the warm cache instead of deadlocking on compilation.
134+
uv pip install --system grpcio --find-links .uv-wheel-cache
107135
- name: Run unit tests for ${{ matrix.package_shard.description }}
108136
env:
109137
BUILD_TYPE: presubmit

ci/run_single_test.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ case ${TEST_TYPE} in
9090
nox -s unit-3.14
9191
retval=$?
9292
;;
93+
"3.15")
94+
# This is needed to speed up builds
95+
nox --force-venv-backend uv -s unit-3.15
96+
retval=$?
97+
;;
9398
*)
9499
echo "unsupported PY_VERSION"
95100
exit 1

packages/bigframes/mypy.ini

Lines changed: 0 additions & 49 deletions
This file was deleted.

packages/bigframes/noxfile.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
DEFAULT_PYTHON_VERSION = "3.14"
6262

63-
ALL_PYTHON = ["3.10", "3.11", "3.12", "3.13", "3.14"]
63+
ALL_PYTHON = ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
6464
UNIT_TEST_STANDARD_DEPENDENCIES = [
6565
"mock",
6666
PYTEST_VERSION,
@@ -283,6 +283,10 @@ def run_unit(session, install_test_extra):
283283
@nox.session(python=ALL_PYTHON)
284284
@nox.parametrize("test_extra", [True, False])
285285
def unit(session, test_extra):
286+
if session.python == "3.15":
287+
session.skip(
288+
"Skipping 3.15 until wheels are available for pyarrow. Also pyproj wheels are needed for dependency geopandas."
289+
)
286290
if test_extra:
287291
run_unit(session, install_test_extra=test_extra)
288292
else:

packages/bigquery-magics/noxfile.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"3.12",
4242
"3.13",
4343
"3.14",
44+
"3.15",
4445
]
4546

4647
UNIT_TEST_STANDARD_DEPENDENCIES = [
@@ -237,6 +238,10 @@ def install_unittest_dependencies(session, *constraints):
237238
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS)
238239
def unit(session):
239240
# Install all test dependencies, then install this package in-place.
241+
if session.python == "3.15":
242+
session.skip(
243+
"Skipping 3.15 until wheels are available for pyproj needed for dependency geopandas"
244+
)
240245

241246
constraints_path = str(
242247
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"

packages/bigquery-magics/testing/constraints-3.15.txt

Whitespace-only changes.

packages/db-dtypes/noxfile.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"3.12",
4343
"3.13",
4444
"3.14",
45+
"3.15",
4546
]
4647

4748
UNIT_TEST_STANDARD_DEPENDENCIES = [
@@ -302,6 +303,8 @@ def prerelease(session, tests_path):
302303
@nox.parametrize("test_type", ["unit", "compliance"])
303304
def unit(session, test_type):
304305
"""Run the unit test suite."""
306+
if session.python == "3.15":
307+
session.skip("Skipping 3.15 until wheels are available for pyarrow.")
305308

306309
# Compliance tests only run on the latest Python version
307310
if test_type == "compliance" and session.python != DEFAULT_PYTHON_VERSION:

packages/db-dtypes/testing/constraints-3.15.txt

Whitespace-only changes.

packages/django-google-spanner/noxfile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"3.12",
3535
"3.13",
3636
"3.14",
37+
"3.15",
3738
]
3839
ALL_PYTHON = list(UNIT_TEST_PYTHON_VERSIONS)
3940

packages/django-google-spanner/testing/constraints-3.15.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)