Skip to content

Commit f99afe2

Browse files
chore(python): Update the python version in docs presubmit to use 3.10 (#1061)
* chore(python): Update the python version in docs presubmit to use 3.10 Source-Link: googleapis/synthtool@de3def6 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:a1c5112b81d645f5bbc4d4bbc99d7dcb5089a52216c0e3fb1203a0eeabadd7d5 * loosen assertion * update sync * fixed mypy issue --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Daniel Sanche <[email protected]>
1 parent 22652f0 commit f99afe2

File tree

6 files changed

+12
-9
lines changed

6 files changed

+12
-9
lines changed

packages/google-cloud-bigtable/.github/.OwlBot.lock.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 Google LLC
1+
# Copyright 2025 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
16-
digest: sha256:8e3e7e18255c22d1489258d0374c901c01f9c4fd77a12088670cd73d580aa737
17-
# created: 2024-12-17T00:59:58.625514486Z
16+
digest: sha256:a1c5112b81d645f5bbc4d4bbc99d7dcb5089a52216c0e3fb1203a0eeabadd7d5
17+
# created: 2025-01-02T23:09:36.975468657Z

packages/google-cloud-bigtable/.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Setup Python
1313
uses: actions/setup-python@v5
1414
with:
15-
python-version: "3.9"
15+
python-version: "3.10"
1616
- name: Install nox
1717
run: |
1818
python -m pip install --upgrade setuptools pip wheel

packages/google-cloud-bigtable/.github/workflows/unittest.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ on:
55
name: unittest
66
jobs:
77
unit:
8-
runs-on: ubuntu-latest
8+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2303): use `ubuntu-latest` once this bug is fixed.
9+
# Use ubuntu-22.04 until Python 3.7 is removed from the test matrix
10+
# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
11+
runs-on: ubuntu-22.04
912
strategy:
1013
matrix:
1114
python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']

packages/google-cloud-bigtable/google/cloud/bigtable/data/_cross_sync/_decorators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ def get_for_node(cls, node: ast.Call | ast.Attribute | ast.Name) -> "AstDecorato
128128
# extract the module and decorator names
129129
if "CrossSync" in ast.dump(root_attr):
130130
decorator_name = root_attr.attr
131-
got_kwargs = (
132-
{kw.arg: cls._convert_ast_to_py(kw.value) for kw in node.keywords}
131+
got_kwargs: dict[str, Any] = (
132+
{str(kw.arg): cls._convert_ast_to_py(kw.value) for kw in node.keywords}
133133
if hasattr(node, "keywords")
134134
else {}
135135
)

packages/google-cloud-bigtable/tests/unit/data/_async/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ async def test__manage_channel_sleeps(
446446
assert sleep.call_count == num_cycles
447447
total_sleep = sum([call[0][1] for call in sleep.call_args_list])
448448
assert (
449-
abs(total_sleep - expected_sleep) < 0.1
449+
abs(total_sleep - expected_sleep) < 0.5
450450
), f"refresh_interval={refresh_interval}, num_cycles={num_cycles}, expected_sleep={expected_sleep}"
451451
await client.close()
452452

packages/google-cloud-bigtable/tests/unit/data/_sync_autogen/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ def test__manage_channel_sleeps(self, refresh_interval, num_cycles, expected_sle
349349
assert sleep.call_count == num_cycles
350350
total_sleep = sum([call[0][1] for call in sleep.call_args_list])
351351
assert (
352-
abs(total_sleep - expected_sleep) < 0.1
352+
abs(total_sleep - expected_sleep) < 0.5
353353
), f"refresh_interval={refresh_interval}, num_cycles={num_cycles}, expected_sleep={expected_sleep}"
354354
client.close()
355355

0 commit comments

Comments
 (0)