Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit 4e6f326

Browse files
committed
fix: Temporarily disable test_<service>_api_version_header_async which is not marked as async (#2429)
1 parent 84b0a23 commit 4e6f326

File tree

10 files changed

+29
-12
lines changed

10 files changed

+29
-12
lines changed

gapic/templates/noxfile.py.j2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ nox.options.error_on_missing_interpreters = True
8181
def mypy(session):
8282
"""Run the type checker."""
8383
session.install(
84-
"mypy",
84+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410): Use the latest version of mypy
85+
"mypy<1.16.0",
8586
"types-requests",
8687
"types-protobuf",
8788
)

gapic/templates/tests/unit/gapic/%name_%version/%sub/test_%service.py.j2

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,11 @@ def test__get_api_endpoint():
224224

225225
{% if service.version %}
226226
{% for method in service.methods.values() %}{% with method_name = method.name|snake_case %}
227-
{% for mode in ["", "async"] %}
227+
{# TODO(https://github.com/googleapis/gapic-generator-python/issues/2428): Restore async test `
228+
# once it properly runs as an async test with `@pytest.mark.asyncio`
229+
# Add "async" to the list below `for mode in ["", "async"]`
230+
#}
231+
{% for mode in [""] %}
228232
{% if mode == "async" %}
229233
async def test_{{ method_name }}_api_version_header_async(transport_name="grpc"):
230234
client = {{ service.async_client_name }}(credentials=async_anonymous_credentials(), transport=transport_name)

noxfile.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,9 @@ def showcase(
392392
"""Run the Showcase test suite."""
393393

394394
with showcase_library(session, templates=templates, other_opts=other_opts):
395-
session.install("pytest", "pytest-asyncio")
395+
# Use pytest-asyncio<1.0.0 while we investigate the recent failure described in
396+
# https://github.com/googleapis/gapic-generator-python/issues/2399
397+
session.install("pytest", "pytest-asyncio<1.0.0")
396398
test_directory = Path("tests", "system")
397399
ignore_file = env.get("IGNORE_FILE")
398400
pytest_command = [
@@ -422,7 +424,9 @@ def showcase_w_rest_async(
422424
with showcase_library(
423425
session, templates=templates, other_opts=other_opts, rest_async_io_enabled=True
424426
):
425-
session.install("pytest", "pytest-asyncio")
427+
# Use pytest-asyncio<1.0.0 while we investigate the recent failure described in
428+
# https://github.com/googleapis/gapic-generator-python/issues/2399
429+
session.install("pytest", "pytest-asyncio<1.0.0")
426430
test_directory = Path("tests", "system")
427431
ignore_file = env.get("IGNORE_FILE")
428432
pytest_command = [
@@ -585,7 +589,8 @@ def showcase_mypy(
585589
"""Perform typecheck analysis on the generated Showcase library."""
586590

587591
session.install(
588-
"mypy",
592+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410): Use the latest version of mypy
593+
"mypy<1.16.0",
589594
"types-setuptools",
590595
"types-protobuf",
591596
"types-requests",

tests/integration/goldens/asset/noxfile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@
8888
def mypy(session):
8989
"""Run the type checker."""
9090
session.install(
91-
"mypy",
91+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410): Use the latest version of mypy
92+
"mypy<1.16.0",
9293
"types-requests",
9394
"types-protobuf",
9495
)

tests/integration/goldens/credentials/noxfile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@
8888
def mypy(session):
8989
"""Run the type checker."""
9090
session.install(
91-
"mypy",
91+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410): Use the latest version of mypy
92+
"mypy<1.16.0",
9293
"types-requests",
9394
"types-protobuf",
9495
)

tests/integration/goldens/eventarc/noxfile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@
8888
def mypy(session):
8989
"""Run the type checker."""
9090
session.install(
91-
"mypy",
91+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410): Use the latest version of mypy
92+
"mypy<1.16.0",
9293
"types-requests",
9394
"types-protobuf",
9495
)

tests/integration/goldens/logging/noxfile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@
8888
def mypy(session):
8989
"""Run the type checker."""
9090
session.install(
91-
"mypy",
91+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410): Use the latest version of mypy
92+
"mypy<1.16.0",
9293
"types-requests",
9394
"types-protobuf",
9495
)

tests/integration/goldens/logging_internal/noxfile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@
8888
def mypy(session):
8989
"""Run the type checker."""
9090
session.install(
91-
"mypy",
91+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410): Use the latest version of mypy
92+
"mypy<1.16.0",
9293
"types-requests",
9394
"types-protobuf",
9495
)

tests/integration/goldens/redis/noxfile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@
8888
def mypy(session):
8989
"""Run the type checker."""
9090
session.install(
91-
"mypy",
91+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410): Use the latest version of mypy
92+
"mypy<1.16.0",
9293
"types-requests",
9394
"types-protobuf",
9495
)

tests/integration/goldens/redis_selective/noxfile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@
8888
def mypy(session):
8989
"""Run the type checker."""
9090
session.install(
91-
"mypy",
91+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410): Use the latest version of mypy
92+
"mypy<1.16.0",
9293
"types-requests",
9394
"types-protobuf",
9495
)

0 commit comments

Comments
 (0)