Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
6888133
chore: update librarian.yaml; post processing; use root mypy.ini
parthea Jun 26, 2026
a005f72
chore: run generation for all libraries
parthea Jun 26, 2026
89a2319
chore: add 3.15 to remaining libraries; add 3.15 testing
parthea Jun 26, 2026
0121408
chore: allow prerelease testing
parthea Jun 26, 2026
2268331
address review feedback
parthea Jun 26, 2026
8e4766d
chore: enable 3.15 testing
parthea Jun 26, 2026
f48ddbf
chore: attempt to speed up tests
parthea Jun 26, 2026
3cd76c7
chore: revert google-crc32c which has failing tests at head
parthea Jun 26, 2026
8e74097
lint
parthea Jun 26, 2026
7174f0d
chore: attempt to speed up tests
parthea Jun 26, 2026
d92623c
chore: attempt to speed up tests
parthea Jun 26, 2026
5fa6490
Set PYO3_USE_ABI3_FORWARD_COMPATIBILITY for libcst 3.15 compatibility
parthea Jun 26, 2026
354bfe8
chore: revert 3.15 for bigframes
parthea Jun 26, 2026
06643a2
attempt to speed up tests
parthea Jun 26, 2026
7993087
chore: attempt to speed up tests
parthea Jun 26, 2026
3666bed
chore: attempt to speed up tests
parthea Jun 26, 2026
4f12dc3
chore: attempt to speed up tests
parthea Jun 26, 2026
0bd66a3
chore: attempt to speed up tests
parthea Jun 26, 2026
5b13e26
remove 3.9
parthea Jun 26, 2026
e77ee72
chore: typo
parthea Jun 26, 2026
49ba720
chore: typo
parthea Jun 26, 2026
1a41b95
clean up
parthea Jun 26, 2026
6b60ab8
chore: attempt to speed up tests
parthea Jun 26, 2026
6568947
chore: attempt to speed up tests
parthea Jun 26, 2026
86b38d0
chore: attempt to speed up tests
parthea Jun 26, 2026
bd54071
chore: attempt to speed up tests
parthea Jun 26, 2026
fac6703
restore mypy.ini for bigtable
parthea Jun 26, 2026
148c3a8
testing
parthea Jun 26, 2026
0f99cba
testing
parthea Jun 26, 2026
a9db336
testing
parthea Jun 26, 2026
3ec02f5
testing
parthea Jun 26, 2026
15ddf24
testing
parthea Jun 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
42 changes: 36 additions & 6 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ name: unittest
permissions:
contents: read


jobs:
unit:
runs-on: ubuntu-22.04
strategy:
fail-fast: true
matrix:
python: ['3.9', '3.10', "3.11", "3.12", "3.13", "3.14"]
python: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
steps:
- name: Checkout
uses: actions/checkout@v6
Expand All @@ -31,21 +32,50 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
allow-prereleases: true
- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: 'packages/**/testing/constraints*.txt'
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install nox
uv pip install --system nox nox-uv
# Caches compiled wheels locally to prevent building heavy libraries
# such as grpcio, which we build from scratch on every run for Python 3.15+.
# Follow https://github.com/grpc/grpc/issues/41010 for updates.
- name: Cache Built Python 3.15 Wheels
if: matrix.python == '3.15'
uses: actions/cache@v4
with:
path: .uv-wheel-cache
key: ${{ runner.os }}-uv-wheels-3.15-${{ hashFiles('packages/**/testing/constraints*.txt') }}
restore-keys: |
${{ runner.os }}-uv-wheels-3.15-
- name: Run unit tests
env:
COVERAGE_FILE: ${{ github.workspace }}/.coverage-${{ matrix.python }}
BUILD_TYPE: presubmit
TARGET_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref }}
TEST_TYPE: unit
PY_VERSION: ${{ matrix.python }}
# Workaround: Allows libcst to compile on Python 3.15+ while PyO3 catches up
# Can be removed once libcst releases a version with native Python 3.15 wheels
# Follow https://github.com/Instagram/LibCST/issues/1445 for updates.
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: "1"
run: |
# Only inject overrides if we are strictly on the 3.15 pre-release
# This is needed to speed up builds
if [ "${{ matrix.python }}" = "3.15" ]; then
# Tell uv it is allowed to use the pre-release 3.15 toolchain
export UV_PRERELEASE="allow"

# Route uv's wheel and environment cache to our persistent workspace directory
export UV_CACHE_DIR="${{ github.workspace }}/.uv-wheel-cache"
fi
ci/run_conditional_tests.sh
- name: Upload coverage results
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: coverage-artifact-${{ matrix.python }}
path: .coverage-${{ matrix.python }}
Expand All @@ -57,14 +87,14 @@ jobs:
- unit
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
# Use a fetch-depth of 2 to avoid error `fatal: origin/main...HEAD: no merge base`
# See https://github.com/googleapis/google-cloud-python/issues/12013
# and https://github.com/actions/checkout#checkout-head.
with:
fetch-depth: 2
- name: Setup Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Set number of files changes in packages directory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,52 +357,6 @@ replacements:

Quick Start
count: 1
- paths: [
packages/google-cloud-bigtable/mypy.ini
]
before: |
\[mypy\]
[\s\S]*?incremental = True
after: |
[mypy]
python_version = 3.13
namespace_packages = True
check_untyped_defs = True
warn_unreachable = True
disallow_any_generics = True
exclude = tests/unit/gapic/

[mypy-grpc.*]
ignore_missing_imports = True

[mypy-google.auth.*]
ignore_missing_imports = True

[mypy-google.iam.*]
ignore_missing_imports = True

[mypy-google.longrunning.*]
ignore_missing_imports = True

[mypy-google.oauth2.*]
ignore_missing_imports = True

[mypy-google.rpc.*]
ignore_missing_imports = True

[mypy-proto.*]
ignore_missing_imports = True

[mypy-pytest]
ignore_missing_imports = True

[mypy-google.cloud.*]
ignore_errors = True

# only verify data client
[mypy-google.cloud.bigtable.data.*]
ignore_errors = False
count: 1
# Note: noxfile.py is heavily customized so we clobber the whole file.
- paths: [
packages/google-cloud-bigtable/noxfile.py
Expand Down Expand Up @@ -431,6 +385,7 @@ replacements:
"3.12",
"3.13",
"3.14",
"3.15",
]

UNIT_TEST_STANDARD_DEPENDENCIES = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,42 +39,6 @@ replacements:
"google-cloud-core >= 2.0.0, <3.0.0",
"grpcio >= 1.59.0, < 2.0.0",
count: 1
- paths: [
"packages/google-cloud-datastore/mypy.ini",
]
before: |-
# Performance: reuse results from previous runs to speed up 'nox'
incremental = True
after: |-
# Performance: reuse results from previous runs to speed up "nox"
incremental = True

[mypy-google.cloud.datastore._app_engine_key_pb2]
ignore_errors = True

# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410):
# Remove once this generator bug is fixed
[mypy-google.cloud.datastore_v1.services.datastore.async_client]
ignore_errors = True

# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410):
# Remove once this generator bug is fixed
[mypy-google.cloud.datastore_v1.services.datastore.client]
ignore_errors = True
count: 1
- paths: [
"packages/google-cloud-datastore/mypy.ini",
]
before: |
ignore_missing_imports = False

# TODO\(https://github.com/googleapis/gapic-generator-python/issues/2563\):
# Dependencies that historically lacks py.typed markers
\[mypy-google\.iam\.\*\]
ignore_missing_imports = True
after: |
ignore_missing_imports = True
count: 1
- paths: [
"packages/google-cloud-datastore/docs/index.rst",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,7 @@ replacements:
"3.12",
"3.13",
"3.14",
"3.15",
]
UNIT_TEST_STANDARD_DEPENDENCIES = [
"mock",
Expand Down
5 changes: 5 additions & 0 deletions ci/run_single_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ case ${TEST_TYPE} in
nox -s unit-3.14
retval=$?
;;
"3.15")
# This is needed to speed up builds
nox --force-venv-backend uv -s unit-3.15
retval=$?
;;
*)
echo "unsupported PY_VERSION"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion librarian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
language: python
version: v0.22.0
version: v0.22.1-0.20260626155540-a0930f4b0f52
repo: googleapis/google-cloud-python
sources:
googleapis:
Expand Down
49 changes: 0 additions & 49 deletions packages/bigframes/mypy.ini

This file was deleted.

10 changes: 6 additions & 4 deletions packages/bigframes/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

DEFAULT_PYTHON_VERSION = "3.14"

ALL_PYTHON = ["3.10", "3.11", "3.12", "3.13", "3.14"]
ALL_PYTHON = ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
UNIT_TEST_STANDARD_DEPENDENCIES = [
"mock",
PYTEST_VERSION,
Expand Down Expand Up @@ -250,6 +250,8 @@ def install_unittest_dependencies(session, install_test_extra, *constraints):

def run_unit(session, install_test_extra):
"""Run the unit test suite."""
if session.python == "3.15":
session.skip("Wait until pyproj has 3.15 wheels")
constraints_path = str(
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
)
Expand Down Expand Up @@ -289,7 +291,7 @@ def unit(session, test_extra):
unit_noextras(session)


@nox.session(python=ALL_PYTHON[-1])
@nox.session(python=DEFAULT_PYTHON_VERSION)
def unit_noextras(session):
run_unit(session, install_test_extra=False)

Expand Down Expand Up @@ -656,7 +658,7 @@ def prerelease(session: nox.sessions.Session, tests_path, extra_pytest_options=(
)


@nox.session(python=ALL_PYTHON[-1])
@nox.session(python=DEFAULT_PYTHON_VERSION)
def unit_prerelease(session: nox.sessions.Session):
"""Run the unit test suite with prerelease dependencies."""
prerelease(session, os.path.join("tests", "unit"))
Expand Down Expand Up @@ -1040,7 +1042,7 @@ def core_deps_from_source(session, protobuf_implementation):
)


@nox.session(python=ALL_PYTHON[-1])
@nox.session(python=DEFAULT_PYTHON_VERSION)
def prerelease_deps(session):
"""Run all tests with prerelease versions of dependencies installed."""
# TODO(https://github.com/googleapis/google-cloud-python/issues/16014):
Expand Down
3 changes: 0 additions & 3 deletions packages/bigquery-magics/mypy.ini

This file was deleted.

1 change: 1 addition & 0 deletions packages/bigquery-magics/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"3.12",
"3.13",
"3.14",
"3.15",
]

UNIT_TEST_STANDARD_DEPENDENCIES = [
Expand Down
Empty file.
1 change: 1 addition & 0 deletions packages/db-dtypes/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"3.12",
"3.13",
"3.14",
"3.15",
]

UNIT_TEST_STANDARD_DEPENDENCIES = [
Expand Down
Empty file.
1 change: 1 addition & 0 deletions packages/django-google-spanner/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"3.12",
"3.13",
"3.14",
"3.15",
]
ALL_PYTHON = list(UNIT_TEST_PYTHON_VERSIONS)

Expand Down
Empty file.
2 changes: 0 additions & 2 deletions packages/gapic-generator/mypy.ini

This file was deleted.

15 changes: 13 additions & 2 deletions packages/gcp-sphinx-docfx-yaml/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,16 @@
import nox

DEFAULT_PYTHON_VERSION = "3.14"
UNIT_TEST_PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
UNIT_TEST_PYTHON_VERSIONS = [
"3.8",
"3.9",
"3.10",
"3.11",
"3.12",
"3.13",
"3.14",
"3.15",
]
RUFF_VERSION = "ruff==0.14.14"

ALL_PYTHON = list(UNIT_TEST_PYTHON_VERSIONS)
Expand Down Expand Up @@ -138,7 +147,9 @@ def unit(session):
# Re-enable 3.8, 3.9, 3.11, 3.12, and 3.13 after environment verification.
# TODO(https://github.com/googleapis/google-cloud-python/issues/16176):
# Track 3.14 compatibility as upstream dependencies stabilize.
_skip_python_session(session, ["3.7", "3.8", "3.9", "3.11", "3.12", "3.13", "3.14"])
_skip_python_session(
session, ["3.7", "3.8", "3.9", "3.11", "3.12", "3.13", "3.14", "3.15"]
)
session.install("-r", "requirements.txt")
session.install("pytest", "pytest-cov")
session.run(
Expand Down
15 changes: 0 additions & 15 deletions packages/google-ads-admanager/mypy.ini

This file was deleted.

Loading
Loading