From 6bca1060081c2093e407c243921a87f6fc911c80 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Mon, 8 Jun 2026 18:30:22 +0000 Subject: [PATCH 1/2] chore: update librarian to v0.16.1-0.20260608172125-d123ec9cac76 --- librarian.yaml | 2 +- packages/google-cloud-spanner/noxfile.py | 7 +------ packages/google-cloud-spanner/setup.py | 12 +----------- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/librarian.yaml b/librarian.yaml index 20c52d69e5a1..d356794988b4 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. language: python -version: v0.16.0 +version: v0.16.1-0.20260608172125-d123ec9cac76 repo: googleapis/google-cloud-python sources: googleapis: diff --git a/packages/google-cloud-spanner/noxfile.py b/packages/google-cloud-spanner/noxfile.py index fa74716b8142..54ead8405fb9 100644 --- a/packages/google-cloud-spanner/noxfile.py +++ b/packages/google-cloud-spanner/noxfile.py @@ -43,7 +43,6 @@ "pytest", "pytest-cov", "pytest-asyncio", - "pytest-xdist", ] MOCK_SERVER_ADDITIONAL_DEPENDENCIES = [ "google-cloud-testutils", @@ -241,8 +240,6 @@ def unit(session, protobuf_implementation): # Run py.test against the unit tests. args = [ "py.test", - "-n", - "auto", "-s", f"--junitxml=unit_{session.python}_sponge_log.xml", "--cov=google", @@ -757,6 +754,7 @@ def prerelease_deps(session, protobuf_implementation, database_dialect): def mypy(session): """Run the type checker.""" session.skip("Mypy is not yet supported") + # TODO(https://github.com/googleapis/gapic-generator-python/issues/2579): # use the latest version of mypy session.install( @@ -834,15 +832,12 @@ def core_deps_from_source(session, protobuf_implementation): dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source] session.install(*dep_paths, "--no-deps", "--ignore-installed") - session.install("pytest-xdist") print( f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}" ) session.run( "py.test", - "-n", - "auto", "tests/unit", env={ "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, diff --git a/packages/google-cloud-spanner/setup.py b/packages/google-cloud-spanner/setup.py index e7dce1a06904..34eace7a4506 100644 --- a/packages/google-cloud-spanner/setup.py +++ b/packages/google-cloud-spanner/setup.py @@ -60,17 +60,7 @@ "google-cloud-monitoring >= 2.16.0", "mmh3 >= 4.1.0", ] -extras = { - "libcst": "libcst >= 0.2.5", - "test": [ - "pytest", - "mock", - "asyncmock", - "pytest-cov", - "pytest-asyncio", - "pytest-xdist", - ], -} +extras = {"libcst": "libcst >= 0.2.5"} url = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-spanner" From 907ceef305c7de6c9de5ff30c87495af04bf383f Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Mon, 8 Jun 2026 18:32:21 +0000 Subject: [PATCH 2/2] chore: revert spanner changes --- packages/google-cloud-spanner/noxfile.py | 7 ++++++- packages/google-cloud-spanner/setup.py | 12 +++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-spanner/noxfile.py b/packages/google-cloud-spanner/noxfile.py index 54ead8405fb9..fa74716b8142 100644 --- a/packages/google-cloud-spanner/noxfile.py +++ b/packages/google-cloud-spanner/noxfile.py @@ -43,6 +43,7 @@ "pytest", "pytest-cov", "pytest-asyncio", + "pytest-xdist", ] MOCK_SERVER_ADDITIONAL_DEPENDENCIES = [ "google-cloud-testutils", @@ -240,6 +241,8 @@ def unit(session, protobuf_implementation): # Run py.test against the unit tests. args = [ "py.test", + "-n", + "auto", "-s", f"--junitxml=unit_{session.python}_sponge_log.xml", "--cov=google", @@ -754,7 +757,6 @@ def prerelease_deps(session, protobuf_implementation, database_dialect): def mypy(session): """Run the type checker.""" session.skip("Mypy is not yet supported") - # TODO(https://github.com/googleapis/gapic-generator-python/issues/2579): # use the latest version of mypy session.install( @@ -832,12 +834,15 @@ def core_deps_from_source(session, protobuf_implementation): dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source] session.install(*dep_paths, "--no-deps", "--ignore-installed") + session.install("pytest-xdist") print( f"Installed {', '.join(core_dependencies_from_source)} locally from {deps_dir}" ) session.run( "py.test", + "-n", + "auto", "tests/unit", env={ "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation, diff --git a/packages/google-cloud-spanner/setup.py b/packages/google-cloud-spanner/setup.py index 34eace7a4506..e7dce1a06904 100644 --- a/packages/google-cloud-spanner/setup.py +++ b/packages/google-cloud-spanner/setup.py @@ -60,7 +60,17 @@ "google-cloud-monitoring >= 2.16.0", "mmh3 >= 4.1.0", ] -extras = {"libcst": "libcst >= 0.2.5"} +extras = { + "libcst": "libcst >= 0.2.5", + "test": [ + "pytest", + "mock", + "asyncmock", + "pytest-cov", + "pytest-asyncio", + "pytest-xdist", + ], +} url = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-spanner"