From 23ef21c24fe96b8689cc836c5618b48cabdbc13c Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Thu, 29 Oct 2026 17:38:00 -0700 Subject: [PATCH 1/2] chore(bigtable): update pytest-asyncio --- .../client-post-processing/bigtable-integration.yaml | 2 +- packages/google-cloud-bigtable/noxfile.py | 2 +- .../google-cloud-bigtable/tests/system/conftest.py | 11 ----------- .../google-cloud-bigtable/tests/system/pytest.ini | 8 ++++++++ 4 files changed, 10 insertions(+), 13 deletions(-) create mode 100644 packages/google-cloud-bigtable/tests/system/pytest.ini diff --git a/.librarian/generator-input/client-post-processing/bigtable-integration.yaml b/.librarian/generator-input/client-post-processing/bigtable-integration.yaml index 09593bdefc30..59cdc645c97f 100644 --- a/.librarian/generator-input/client-post-processing/bigtable-integration.yaml +++ b/.librarian/generator-input/client-post-processing/bigtable-integration.yaml @@ -417,7 +417,7 @@ replacements: "google-cloud-testutils", ] SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = [ - "pytest-asyncio==0.21.2", + "pytest-asyncio", "pytest-order==1.3.0", RUFF_VERSION, "pyyaml==6.0.2", diff --git a/packages/google-cloud-bigtable/noxfile.py b/packages/google-cloud-bigtable/noxfile.py index 8f68486cd3a3..550d3837480b 100644 --- a/packages/google-cloud-bigtable/noxfile.py +++ b/packages/google-cloud-bigtable/noxfile.py @@ -57,7 +57,7 @@ "google-cloud-testutils", ] SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = [ - "pytest-asyncio==0.21.2", + "pytest-asyncio", "pytest-order==1.3.0", RUFF_VERSION, "pyyaml==6.0.2", diff --git a/packages/google-cloud-bigtable/tests/system/conftest.py b/packages/google-cloud-bigtable/tests/system/conftest.py index e9cb2fcc91e8..7a7b315ec542 100644 --- a/packages/google-cloud-bigtable/tests/system/conftest.py +++ b/packages/google-cloud-bigtable/tests/system/conftest.py @@ -15,19 +15,8 @@ Import pytest fixtures for setting up table for data client system tests """ -import asyncio import os import sys -import pytest - script_path = os.path.dirname(os.path.realpath(__file__)) sys.path.append(script_path) - - -@pytest.fixture(scope="session") -def event_loop(): - loop = asyncio.new_event_loop() - yield loop - loop.stop() - loop.close() diff --git a/packages/google-cloud-bigtable/tests/system/pytest.ini b/packages/google-cloud-bigtable/tests/system/pytest.ini new file mode 100644 index 000000000000..ae7833d23bf6 --- /dev/null +++ b/packages/google-cloud-bigtable/tests/system/pytest.ini @@ -0,0 +1,8 @@ +[pytest] +# The data client system tests share a single client across the whole session +# (see the session-scoped `client`/`target`/`table` fixtures), so every async +# fixture and test must run on the same event loop. Run them all on a single +# session-scoped loop, matching the previous session-scoped `event_loop` +# override that pytest-asyncio removed in 1.0. +asyncio_default_test_loop_scope = session +asyncio_default_fixture_loop_scope = session From 977e732b641f6bc7aea74e7a7cb3354d48e4c956 Mon Sep 17 00:00:00 2001 From: Daniel Sanche Date: Thu, 29 Oct 2026 17:49:13 -0700 Subject: [PATCH 2/2] added version floor --- .../client-post-processing/bigtable-integration.yaml | 2 +- packages/google-cloud-bigtable/noxfile.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.librarian/generator-input/client-post-processing/bigtable-integration.yaml b/.librarian/generator-input/client-post-processing/bigtable-integration.yaml index 59cdc645c97f..2953a7f52135 100644 --- a/.librarian/generator-input/client-post-processing/bigtable-integration.yaml +++ b/.librarian/generator-input/client-post-processing/bigtable-integration.yaml @@ -417,7 +417,7 @@ replacements: "google-cloud-testutils", ] SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = [ - "pytest-asyncio", + "pytest-asyncio>=0.26.0", "pytest-order==1.3.0", RUFF_VERSION, "pyyaml==6.0.2", diff --git a/packages/google-cloud-bigtable/noxfile.py b/packages/google-cloud-bigtable/noxfile.py index 550d3837480b..88d0237720fa 100644 --- a/packages/google-cloud-bigtable/noxfile.py +++ b/packages/google-cloud-bigtable/noxfile.py @@ -57,7 +57,7 @@ "google-cloud-testutils", ] SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = [ - "pytest-asyncio", + "pytest-asyncio>=0.26.0", "pytest-order==1.3.0", RUFF_VERSION, "pyyaml==6.0.2",