Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
add comment for checking api-core supported version
  • Loading branch information
ohmayr committed Sep 10, 2024
commit 38dcdd0219efde3337b55ee34874269e6b62b4bf
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta):
}
provided_unsupported_params = [name for name, value in unsupported_params.items() if value is not None]
if provided_unsupported_params:
{# TODO(https://github.com/googleapis/gapic-generator-python/issues/2137): Remove `type: ignore` once we add a version check for google-api-core. #}
raise core_exceptions.AsyncRestUnsupportedParameterError( # type: ignore
f"The following provided parameters are not supported for `transport=rest_asyncio`: {', '.join(provided_unsupported_params)}"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1938,6 +1938,7 @@ def test_unsupported_parameter_rest_asyncio():
{# TODO(https://github.com/googleapis/google-auth-library-python/pull/1577): Update the version of google-auth once the linked PR is merged. #}
pytest.skip("google-auth > 2.x.x is required for async rest transport.")
options = client_options.ClientOptions(quota_project_id="octopus")
{# TODO(https://github.com/googleapis/gapic-generator-python/issues/2137): Remove `type: ignore` once we add a version check for google-api-core. #}
with pytest.raises(core_exceptions.AsyncRestUnsupportedParameterError, match="google.api_core.client_options.ClientOptions.quota_project_id") as exc: # type: ignore
client = {{ get_client(service, True) }}(
credentials={{get_credentials(True)}},
Expand Down