Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ class {{service.name}}RestTransport({{service.name}}Transport):
"{host}{uri}".format(host=self._host, uri=uri),
timeout=timeout,
headers=headers,
params=rest_helpers.flatten_query_params(query_params),
params=rest_helpers.flatten_query_params(query_params, strict=True),
{% if body_spec %}
data=body,
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion gapic/ads-templates/setup.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ setuptools.setup(
install_requires=(
{# TODO(dovs): remove when 1.x deprecation is complete #}
{% if 'rest' in opts.transport %}
'google-api-core[grpc] >= 2.4.0, < 3.0.0dev',
'google-api-core[grpc] >= 2.10.0, < 3.0.0dev',
{% else %}
'google-api-core[grpc] >= 1.28.0, < 3.0.0dev',
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ def test_{{ method_name }}_rest_required_fields(request_type={{ method.input.ide
{% if req_field.field_pb.type == 9 %}
"{{ req_field.field_pb.default_value }}",
{% else %}
{{ req_field.type.python_type(req_field.field_pb.default_value or 0) }},
str({{ req_field.type.python_type(req_field.field_pb.default_value or 0) }}),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not seem right, and it fails generated unit tests for compute

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that you mention it, yes, I think you're right. This "else" should be an "elseif" specific to bools. Yikes! That was quite an oversight on my part. Thanks for catching it.

{% endif %}{# default is str #}
),
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ class {{service.name}}RestTransport({{service.name}}Transport):
"{host}{uri}".format(host=self._host, uri=uri),
timeout=timeout,
headers=headers,
params=rest_helpers.flatten_query_params(query_params),
params=rest_helpers.flatten_query_params(query_params, strict=True),
{% if body_spec %}
data=body,
{% endif %}
Expand Down
5 changes: 0 additions & 5 deletions gapic/templates/setup.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,7 @@ setuptools.setup(
platforms='Posix; MacOS X; Windows',
include_package_data=True,
install_requires=(
{# TODO(dovs): remove when 1.x deprecation is complete #}
{% if 'rest' in opts.transport %}
'google-api-core[grpc] >= 2.10.0, < 3.0.0dev',
{% else %}
'google-api-core[grpc] >= 2.10.0, < 3.0.0dev',
{% endif %}
'libcst >= 0.2.5',
'googleapis-common-protos >= 1.55.0, <2.0.0dev',
'proto-plus >= 1.19.7',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,7 @@ def test_{{ method_name }}_rest_required_fields(request_type={{ method.input.ide
{% if req_field.field_pb.type == 9 %}
"{{ req_field.field_pb.default_value }}",
{% else %}
{{ req_field.type.python_type(req_field.field_pb.default_value or 0) }},
str({{ req_field.type.python_type(req_field.field_pb.default_value or 0) }}),
{% endif %}{# default is str #}
),
{% endfor %}
Expand Down