Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ branchProtectionRules:
requiresStrictStatusChecks: true
requiredStatusCheckContexts:
- 'Kokoro'
- 'Kokoro system-3.12'
- 'Kokoro system-3.14'
- 'cla/google'
- 'Samples - Lint'
- 'Samples - Python 3.9'
- 'Samples - Python 3.12'
- 'Samples - Python 3.14'
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: 3.13
python-version: 3.14
- name: Install nox
run: python -m pip install nox
- name: Run system tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: 3.13
python-version: 3.14
- name: Install nox
run: python -m pip install nox
- name: Run system tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mock_server_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: 3.13
python-version: 3.14
- name: Install nox
run: python -m pip install nox
- name: Run mock server tests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/presubmit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: 3.13
python-version: 3.14
- name: Install nox
run: python -m pip install nox
- name: Check formatting
Expand All @@ -27,7 +27,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- name: Checkout code
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`_.
Expand Down
30 changes: 24 additions & 6 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,18 @@
ISORT_VERSION = "isort==5.11.0"
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]

DEFAULT_PYTHON_VERSION = "3.12"
DEFAULT_PYTHON_VERSION = "3.14"

DEFAULT_MOCK_SERVER_TESTS_PYTHON_VERSION = "3.12"
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.12"]
SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.14"]

UNIT_TEST_PYTHON_VERSIONS: List[str] = [
"3.9",
"3.10",
"3.11",
"3.12",
"3.13",
"3.14",
]
UNIT_TEST_STANDARD_DEPENDENCIES = [
"mock",
Expand Down Expand Up @@ -81,6 +82,7 @@
"unit-3.11",
"unit-3.12",
"unit-3.13",
"unit-3.14",
"system",
"cover",
"lint",
Expand Down Expand Up @@ -195,7 +197,12 @@ 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"):
if protobuf_implementation == "cpp" and session.python in (
"3.11",
"3.12",
"3.13",
"3.14",
):
session.skip("cpp implementation is not supported in python 3.11+")

constraints_path = str(
Expand All @@ -213,6 +220,7 @@ def unit(session, protobuf_implementation):
session.run(
"py.test",
"--quiet",
"-s",
f"--junitxml=unit_{session.python}_sponge_log.xml",
"--cov=google",
"--cov=tests/unit",
Expand Down Expand Up @@ -326,7 +334,12 @@ def system(session, protobuf_implementation, database_dialect):
"Only run system tests on real Spanner with one protobuf implementation to speed up the build"
)

if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
if protobuf_implementation == "cpp" and session.python in (
"3.11",
"3.12",
"3.13",
"3.14",
):
session.skip("cpp implementation is not supported in python 3.11+")

# Install pyopenssl for mTLS testing.
Expand Down Expand Up @@ -470,7 +483,7 @@ def docfx(session):
)


@nox.session(python="3.13")
@nox.session(python="3.14")
@nox.parametrize(
"protobuf_implementation,database_dialect",
[
Expand All @@ -485,7 +498,12 @@ def docfx(session):
def prerelease_deps(session, protobuf_implementation, database_dialect):
"""Run all tests with prerelease versions of dependencies installed."""

if protobuf_implementation == "cpp" and session.python in ("3.11", "3.12", "3.13"):
if protobuf_implementation == "cpp" and session.python in (
"3.11",
"3.12",
"3.13",
"3.14",
):
session.skip("cpp implementation is not supported in python 3.11+")

# Install all dependencies
Expand Down
9 changes: 8 additions & 1 deletion owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ def get_staging_dirs(
cov_level=98,
split_system_tests=True,
system_test_extras=["tracing"],
system_test_python_versions=["3.12"]
system_test_python_versions=["3.12"],
unit_test_python_versions=["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
)
s.move(
templated_files,
Expand Down Expand Up @@ -302,6 +303,12 @@ def get_staging_dirs(
# Update samples folder in CONTRIBUTING.rst
s.replace("CONTRIBUTING.rst", "samples/snippets", "samples/samples")

s.replace(
"noxfile.py",
'''session.python in \("3.11", "3.12", "3.13"\)''',
'''session.python in ("3.11", "3.12", "3.13", "3.14")'''
)

# ----------------------------------------------------------------------------
# Samples templates
# ----------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.14",
"Operating System :: OS Independent",
"Topic :: Internet",
],
Expand Down
2 changes: 1 addition & 1 deletion testing/constraints-3.14.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ google-auth>=2
grpcio>=1
proto-plus>=1
protobuf>=6
grpc-google-iam-v1>=0
grpc-google-iam-v1>=0
32 changes: 32 additions & 0 deletions tests/unit/test_spanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,38 @@ def test_transaction_for_concurrent_statement_should_begin_one_transaction_with_
)

self.assertEqual(api.execute_batch_dml.call_count, 2)

call_args_list = api.execute_batch_dml.call_args_list

a11 = mock.call(
request=self._batch_update_expected_request(),
metadata=[
("google-cloud-resource-prefix", database.name),
("x-goog-spanner-route-to-leader", "true"),
(
"x-goog-spanner-request-id",
f"1.{REQ_RAND_PROCESS_ID}.{database._nth_client_id}.{database._channel_id}.1.1",
),
],
retry=RETRY,
timeout=TIMEOUT,
)
b21 = mock.call(
request=self._batch_update_expected_request(begin=False),
metadata=[
("google-cloud-resource-prefix", database.name),
("x-goog-spanner-route-to-leader", "true"),
(
"x-goog-spanner-request-id",
f"1.{REQ_RAND_PROCESS_ID}.{database._nth_client_id}.{database._channel_id}.2.1",
),
],
retry=RETRY,
timeout=TIMEOUT,
)
print("\nDINOSAUR CALL_ARGS_LIST: ", call_args_list)
print("\nDINOSAUR BOTH: ", [a11, b21])

self.assertEqual(
api.execute_batch_dml.call_args_list,
[
Expand Down
Loading