这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
bbedb8c
updated classifier
daniel-sanche Oct 9, 2025
e093026
updated test versions
daniel-sanche Oct 9, 2025
e79f193
updated cross sync
daniel-sanche Oct 9, 2025
3ae39eb
updated failing test
daniel-sanche Oct 9, 2025
7a1fe12
updated CONTRIBUTING.md
daniel-sanche Oct 10, 2025
89153f1
fixed event loop creation for system tests
daniel-sanche Oct 10, 2025
808cc8e
added new samples tests
daniel-sanche Oct 10, 2025
8353ca4
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 10, 2025
b9771af
updated required checks
daniel-sanche Oct 10, 2025
2099d1c
updated prerelease_deps
daniel-sanche Oct 10, 2025
08a07d0
updated owlbot config
daniel-sanche Oct 10, 2025
cd30d1f
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 10, 2025
53c7d30
added constriants file
daniel-sanche Oct 10, 2025
d1d1595
updated grpc version requirement
daniel-sanche Oct 10, 2025
e6815ca
skip cpp tests in 3.14
daniel-sanche Oct 10, 2025
0586d57
fixed prerelease_deps
daniel-sanche Oct 10, 2025
e2f6f0f
updated python versions
daniel-sanche Oct 13, 2025
366e5e5
updated test configs
daniel-sanche Oct 13, 2025
d93ba56
removed unit test configs
daniel-sanche Oct 13, 2025
5dc51a0
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 13, 2025
6dd9982
Merge branch 'py314' of https://github.com/googleapis/python-bigtable…
gcf-owl-bot[bot] Oct 13, 2025
811f094
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 13, 2025
198198e
Merge branch 'py314' of https://github.com/googleapis/python-bigtable…
gcf-owl-bot[bot] Oct 13, 2025
e82362d
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 13, 2025
62925e9
Merge branch 'py314' of https://github.com/googleapis/python-bigtable…
gcf-owl-bot[bot] Oct 13, 2025
343522c
updated unit test versions
daniel-sanche Oct 13, 2025
0f63309
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 13, 2025
1f811d7
changed strategy for old python versions
daniel-sanche Oct 13, 2025
40d19c9
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 13, 2025
bdfb1a7
added system_tests_versions
daniel-sanche Oct 13, 2025
55522e5
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 13, 2025
19df3e6
only one system test
daniel-sanche Oct 13, 2025
ddb5d1f
removed old configs
daniel-sanche Oct 13, 2025
dd956d1
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 13, 2025
6fdb6d1
Merge branch 'py314' of https://github.com/googleapis/python-bigtable…
gcf-owl-bot[bot] Oct 13, 2025
fa245af
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 13, 2025
150ec60
Merge branch 'py314' of https://github.com/googleapis/python-bigtable…
gcf-owl-bot[bot] Oct 13, 2025
bf7dc8d
fix kokoro configs
daniel-sanche Oct 14, 2025
9e593eb
updated python version in Github Actions
daniel-sanche Oct 14, 2025
e00215a
fixing noxfile
daniel-sanche Oct 14, 2025
ccdc3bd
removed env var
daniel-sanche Oct 15, 2025
999a57f
updated system test name
daniel-sanche Oct 15, 2025
3cb51ad
updated default python version
daniel-sanche Oct 15, 2025
4824329
fixed owlbot
daniel-sanche Oct 15, 2025
fd45cd7
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Oct 15, 2025
40187ca
revert black
daniel-sanche Oct 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .cross_sync/transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,19 @@ def visit_FunctionDef(self, node):
Replace function docstrings
"""
docstring = ast.get_docstring(node)
if docstring and isinstance(node.body[0], ast.Expr) and isinstance(
node.body[0].value, ast.Str
):
if docstring and isinstance(node.body[0], ast.Expr) \
and isinstance(node.body[0].value, ast.Constant) \
and isinstance(node.body[0].value.value, str) \
:
for key_word, replacement in self.replacements.items():
docstring = docstring.replace(key_word, replacement)
node.body[0].value.s = docstring
node.body[0].value.value = docstring
return self.generic_visit(node)

def visit_Constant(self, node):
"""Replace string type annotations"""
try:
node.s = self.replacements.get(node.s, node.s)
node.value = self.replacements.get(node.value, node.value)
except TypeError:
# ignore unhashable types (e.g. list)
pass
Expand Down Expand Up @@ -264,7 +265,7 @@ def get_output_path(self, node):
for target in n.targets:
if isinstance(target, ast.Name) and target.id == self.FILE_ANNOTATION:
# return the output path
return n.value.s.replace(".", "/") + ".py"
return n.value.value.replace(".", "/") + ".py"

def visit_Module(self, node):
# look for __CROSS_SYNC_OUTPUT__ Assign statement
Expand Down
4 changes: 2 additions & 2 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:5581906b957284864632cde4e9c51d1cc66b0094990b27e689132fe5cd036046
# created: 2025-03-05
digest: sha256:4a9e5d44b98e8672e2037ee22bc6b4f8e844a2d75fcb78ea8a4b38510112abc6
# created: 2025-10-07
12 changes: 11 additions & 1 deletion .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,19 @@ branchProtectionRules:
# List of required status check contexts that must pass for commits to be accepted to matching branches.
requiredStatusCheckContexts:
- 'Kokoro'
- 'Kokoro system-3.8'
- 'Kokoro system'
- 'cla/google'
- 'OwlBot Post Processor'
- 'lint'
- 'mypy'
- 'docs'
- 'docfx'
- 'unit-3.9'
- 'unit-3.10'
- 'unit-3.11'
- 'unit-3.12'
- 'unit-3.13'
- 'unit-3.14'
# List of explicit permissions to add (additive only)
permissionRules:
# Team slug to add to repository permissions
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conformance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
matrix:
test-version: [ "v0.0.4" ]
py-version: [ 3.8 ]
py-version: [ 3.13 ]
client-type: [ "async", "sync"]
# None of the clients currently support reverse scans, execute query plan refresh, retry info, or routing cookie
include:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.13"
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/system_emulated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.13'

- name: Setup GCloud SDK
uses: google-github-actions/setup-gcloud@v2.1.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
# Only run this nox session.
env_vars: {
key: "NOX_SESSION"
value: "system-3.8"
value: "system-3.9"
}
7 changes: 7 additions & 0 deletions .kokoro/presubmit/system.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Only run this nox session.
env_vars: {
key: "NOX_SESSION"
value: "system-3.9"
}
40 changes: 40 additions & 0 deletions .kokoro/samples/python3.14/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

# Specify which tests to run
env_vars: {
key: "RUN_TESTS_SESSION"
value: "py-3.14"
}

# Declare build specific Cloud project.
env_vars: {
key: "BUILD_SPECIFIC_GCLOUD_PROJECT"
value: "python-docs-samples-tests-314"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-bigtable/.kokoro/test-samples.sh"
}

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker"
}

# Download secrets for samples
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples"

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "python-bigtable/.kokoro/trampoline_v2.sh"
6 changes: 6 additions & 0 deletions .kokoro/samples/python3.14/continuous.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "True"
}
11 changes: 11 additions & 0 deletions .kokoro/samples/python3.14/periodic-head.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "True"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-bigtable/.kokoro/test-samples-against-head.sh"
}
6 changes: 6 additions & 0 deletions .kokoro/samples/python3.14/periodic.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "False"
}
6 changes: 6 additions & 0 deletions .kokoro/samples/python3.14/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Format: //devtools/kokoro/config/proto/build.proto

env_vars: {
key: "INSTALL_LIBRARY_FROM_SOURCE"
value: "True"
}
10 changes: 6 additions & 4 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In order to add a feature:
documentation.

- The feature must work fully on the following CPython versions:
3.7, 3.8, 3.9, 3.10, 3.11, 3.12 and 3.13 on both UNIX and Windows.
3.7, 3.8, 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
Expand Down Expand Up @@ -72,7 +72,7 @@ We use `nox <https://nox.readthedocs.io/en/latest/>`__ to instrument our tests.

- To run a single unit test::

$ nox -s unit-3.13 -- -k <name of test>
$ nox -s unit-3.14 -- -k <name of test>


.. note::
Expand Down Expand Up @@ -143,12 +143,12 @@ Running System Tests
$ nox -s system

# Run a single system test
$ nox -s system-3.8 -- -k <name of test>
$ nox -s system-3.9 -- -k <name of test>


.. note::

System tests are only configured to run under Python 3.8.
System tests are only configured to run under Python 3.9.
For expediency, we do not run them in older versions of Python 3.

This alone will not run the tests. You'll need to change some local
Expand Down Expand Up @@ -228,6 +228,7 @@ We support:
- `Python 3.11`_
- `Python 3.12`_
- `Python 3.13`_
- `Python 3.14`_

.. _Python 3.7: https://docs.python.org/3.7/
.. _Python 3.8: https://docs.python.org/3.8/
Expand All @@ -236,6 +237,7 @@ We support:
.. _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`_.
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/bigtable/data/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __init__(self, message, excs):
# apply index header
if idx != 0:
message_parts.append(
f"+---------------- {str(idx+1).rjust(2)} ----------------"
f"+---------------- {str(idx + 1).rjust(2)} ----------------"
)
cause = e.__cause__
# if this exception was had a cause, print the cause first
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/bigtable/data/row.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def __str__(self) -> str:
elif len(cell_list) == 1:
line.append(f"[{cell_list[0]}],")
else:
line.append(f"[{cell_list[0]}, (+{len(cell_list)-1} more)],")
line.append(f"[{cell_list[0]}, (+{len(cell_list) - 1} more)],")
output.append("".join(line))
output.append("}")
return "\n".join(output)
Expand Down
12 changes: 11 additions & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[mypy]
python_version = 3.8
python_version = 3.13
namespace_packages = True
check_untyped_defs = True
warn_unreachable = True
disallow_any_generics = True
exclude = tests/unit/gapic/

[mypy-grpc.*]
Expand All @@ -26,3 +29,10 @@ 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
40 changes: 17 additions & 23 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
ISORT_VERSION = "isort==5.11.0"
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]

DEFAULT_PYTHON_VERSION = "3.8"
DEFAULT_PYTHON_VERSION = "3.13"

UNIT_TEST_PYTHON_VERSIONS: List[str] = [
"3.7",
Expand All @@ -42,6 +42,7 @@
"3.11",
"3.12",
"3.13",
"3.14",
]
UNIT_TEST_STANDARD_DEPENDENCIES = [
"mock",
Expand All @@ -58,7 +59,7 @@
UNIT_TEST_EXTRAS: List[str] = []
UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}

SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8", "3.12"]
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.9", "3.14"]
SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [
"mock",
"pytest",
Expand All @@ -78,7 +79,12 @@

# 'docfx' is excluded since it only needs to run in 'docs-presubmit'
nox.options.sessions = [
"unit",
"unit-3.9",
"unit-3.10",
"unit-3.11",
"unit-3.12",
"unit-3.13",
"unit-3.14",
"system_emulated",
"system",
"mypy",
Expand Down Expand Up @@ -148,26 +154,13 @@ def mypy(session):
"mypy", "types-setuptools", "types-protobuf", "types-mock", "types-requests"
)
session.install("google-cloud-testutils")
session.run(
"mypy",
"-p",
"google.cloud.bigtable.data",
"--check-untyped-defs",
"--warn-unreachable",
"--disallow-any-generics",
"--exclude",
"tests/system/v2_client",
"--exclude",
"tests/unit/v2_client",
"--disable-error-code",
"func-returns-value", # needed for CrossSync.rm_aio
)
session.run("mypy", "-p", "google.cloud.bigtable.data")


@nox.session(python=DEFAULT_PYTHON_VERSION)
def lint_setup_py(session):
"""Verify that setup.py is valid (including RST check)."""
session.install("docutils", "pygments")
session.install("setuptools", "docutils", "pygments")
session.run("python", "setup.py", "check", "--restructuredtext", "--strict")


Expand Down Expand Up @@ -206,8 +199,8 @@ def install_unittest_dependencies(session, *constraints):
)
def unit(session, protobuf_implementation):
# Install all test dependencies, then install this package in-place.

if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
py_version = tuple([int(v) for v in session.python.split(".")])
if protobuf_implementation == "cpp" and py_version >= (3, 11):
session.skip("cpp implementation is not supported in python 3.11+")

constraints_path = str(
Expand Down Expand Up @@ -270,7 +263,7 @@ def install_systemtest_dependencies(session, *constraints):
session.install("-e", ".", *constraints)


@nox.session(python="3.8")
@nox.session(python=DEFAULT_PYTHON_VERSION)
def system_emulated(session):
import subprocess
import signal
Expand Down Expand Up @@ -456,15 +449,16 @@ def docfx(session):
session.run("python", "docs/scripts/patch_devsite_toc.py")


@nox.session(python="3.12")
@nox.session(python="3.14")
@nox.parametrize(
"protobuf_implementation",
["python", "upb", "cpp"],
)
def prerelease_deps(session, protobuf_implementation):
"""Run all tests with prerelease versions of dependencies installed."""

if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
py_version = tuple([int(v) for v in session.python.split(".")])
if protobuf_implementation == "cpp" and py_version >= (3, 11):
session.skip("cpp implementation is not supported in python 3.11+")

# Install all dependencies
Expand Down
2 changes: 2 additions & 0 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ def get_staging_dirs(
system_test_external_dependencies=[
"pytest-asyncio==0.21.2",
],
system_test_python_versions=["3.9"],
unit_test_python_versions=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"],
)

s.move(templated_files, excludes=[".coveragerc", "README.rst", ".github/release-please.yml", "noxfile.py", "renovate.json"])
Expand Down
Loading
Loading