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

Commit b284a46

Browse files
authored
Merge branch 'master' into self-signed-jwt
2 parents c85fdd4 + 8d9538b commit b284a46

14 files changed

Lines changed: 128 additions & 26 deletions

File tree

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11
# Changelog
22

3+
### [0.43.3](https://www.github.com/googleapis/gapic-generator-python/compare/v0.43.2...v0.43.3) (2021-04-12)
4+
5+
6+
### Bug Fixes
7+
8+
* sort subpackages in %namespace/%name/__init__.py ([#836](https://www.github.com/googleapis/gapic-generator-python/issues/836)) ([90cf882](https://www.github.com/googleapis/gapic-generator-python/commit/90cf882b20f430499f692e6b9b23497b3555e928))
9+
10+
### [0.43.2](https://www.github.com/googleapis/gapic-generator-python/compare/v0.43.1...v0.43.2) (2021-03-24)
11+
12+
13+
### Bug Fixes
14+
15+
* add certain raw imports to RESERVED_NAMES ([#824](https://www.github.com/googleapis/gapic-generator-python/issues/824)) ([04bd8aa](https://www.github.com/googleapis/gapic-generator-python/commit/04bd8aaf0fc2c2c0615105cab39dc33266b66775))
16+
* Update module alias to resolve naming conflict ([#820](https://www.github.com/googleapis/gapic-generator-python/issues/820)) ([f5e9f36](https://www.github.com/googleapis/gapic-generator-python/commit/f5e9f367ec6a72b4272f559a93f6fbb3d7e54b8b)), closes [#819](https://www.github.com/googleapis/gapic-generator-python/issues/819)
17+
18+
### [0.43.1](https://www.github.com/googleapis/gapic-generator-python/compare/v0.43.0...v0.43.1) (2021-03-19)
19+
20+
21+
### Bug Fixes
22+
23+
* use correct retry deadline in publisher methods ([#814](https://www.github.com/googleapis/gapic-generator-python/issues/814)) ([92a2cfc](https://www.github.com/googleapis/gapic-generator-python/commit/92a2cfc47b24c4b1a041d5bbb944d69a67a962a2))
24+
25+
## [0.43.0](https://www.github.com/googleapis/gapic-generator-python/compare/v0.42.2...v0.43.0) (2021-03-11)
26+
27+
28+
### Features
29+
30+
* add bazel support for gapic metadata ([#811](https://www.github.com/googleapis/gapic-generator-python/issues/811)) ([7ced24a](https://www.github.com/googleapis/gapic-generator-python/commit/7ced24a0b20cb6505587b946c03b1b038eef4b4a))
31+
* update templates to permit enum aliases ([#809](https://www.github.com/googleapis/gapic-generator-python/issues/809)) ([2e7ea11](https://www.github.com/googleapis/gapic-generator-python/commit/2e7ea11f80210459106f9780e5f013e2a0381d29))
32+
333
### [0.42.2](https://www.github.com/googleapis/gapic-generator-python/compare/v0.42.1...v0.42.2) (2021-03-05)
434

535

CODE_OF_CONDUCT.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Contributor Code of Conduct
2+
3+
As contributors and maintainers of this project,
4+
and in the interest of fostering an open and welcoming community,
5+
we pledge to respect all people who contribute through reporting issues,
6+
posting feature requests, updating documentation,
7+
submitting pull requests or patches, and other activities.
8+
9+
We are committed to making participation in this project
10+
a harassment-free experience for everyone,
11+
regardless of level of experience, gender, gender identity and expression,
12+
sexual orientation, disability, personal appearance,
13+
body size, race, ethnicity, age, religion, or nationality.
14+
15+
Examples of unacceptable behavior by participants include:
16+
17+
* The use of sexualized language or imagery
18+
* Personal attacks
19+
* Trolling or insulting/derogatory comments
20+
* Public or private harassment
21+
* Publishing other's private information,
22+
such as physical or electronic
23+
addresses, without explicit permission
24+
* Other unethical or unprofessional conduct.
25+
26+
Project maintainers have the right and responsibility to remove, edit, or reject
27+
comments, commits, code, wiki edits, issues, and other contributions
28+
that are not aligned to this Code of Conduct.
29+
By adopting this Code of Conduct,
30+
project maintainers commit themselves to fairly and consistently
31+
applying these principles to every aspect of managing this project.
32+
Project maintainers who do not follow or enforce the Code of Conduct
33+
may be permanently removed from the project team.
34+
35+
This code of conduct applies both within project spaces and in public spaces
36+
when an individual is representing the project or its community.
37+
38+
Instances of abusive, harassing, or otherwise unacceptable behavior
39+
may be reported by opening an issue
40+
or contacting one or more of the project maintainers.
41+
42+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0,
43+
available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)

gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports/base.py.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ class {{ service.name }}Transport(metaclass=abc.ABCMeta):
9393
exceptions.{{ ex.__name__ }},
9494
{%- endfor %}
9595
),
96+
deadline={{ method.timeout }},
9697
),
9798
{%- endif %}
9899
default_timeout={{ method.timeout }},

gapic/schema/metadata.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,12 @@ def module_alias(self) -> str:
115115
return '_'.join(
116116
(
117117
''.join(
118-
i[0]
119-
for i in self.package
120-
if i != self.api_naming.version
118+
[
119+
partial_name[0]
120+
for i in self.package
121+
for partial_name in i.split("_")
122+
if i != self.api_naming.version
123+
]
121124
),
122125
self.module,
123126
)

gapic/templates/%namespace/%name/__init__.py.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ from {% if api.naming.module_namespace %}{{ api.naming.module_namespace|join('.'
4646
__all__ = (
4747
{%- filter indent %}
4848
{% filter sort_lines -%}
49-
{% for subpackage in api.subpackages.keys() -%}
49+
{% for subpackage, _ in api.subpackages|dictsort -%}
5050
'{{ subpackage }}',
5151
{% endfor -%}
5252
{% for service in api.services.values()|sort(attribute='name')

gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ class {{ service.async_client_name }}:
254254
exceptions.{{ ex.__name__ }},
255255
{%- endfor %}
256256
),
257+
deadline={{ method.timeout }},
257258
),
258259
{%- endif %}
259260
default_timeout={{ method.timeout }},

gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/base.py.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ class {{ service.name }}Transport(abc.ABC):
178178
exceptions.{{ ex.__name__ }},
179179
{%- endfor %}
180180
),
181+
deadline={{ method.timeout }},
181182
),
182183
{%- endif %}
183184
default_timeout={{ method.timeout }},

gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/grpc.py.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class {{ service.name }}GrpcTransport({{ service.name }}Transport):
119119
# If a channel was explicitly provided, set it.
120120
self._grpc_channel = channel
121121
self._ssl_channel_credentials = None
122-
122+
123123
else:
124124
if api_mtls_endpoint:
125125
host = api_mtls_endpoint
@@ -133,14 +133,14 @@ class {{ service.name }}GrpcTransport({{ service.name }}Transport):
133133
)
134134
else:
135135
self._ssl_channel_credentials = SslCredentials().ssl_credentials
136-
136+
137137
else:
138138
if client_cert_source_for_mtls and not ssl_channel_credentials:
139139
cert, key = client_cert_source_for_mtls()
140140
self._ssl_channel_credentials = grpc.ssl_channel_credentials(
141141
certificate_chain=cert, private_key=key
142142
)
143-
143+
144144
# The base transport sets the host, credentials and scopes
145145
super().__init__(
146146
host=host,

gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/grpc_asyncio.py.j2

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class {{ service.grpc_asyncio_transport_name }}({{ service.name }}Transport):
124124
If provided, it overrides the ``host`` argument and tries to create
125125
a mutual TLS channel with client SSL credentials from
126126
``client_cert_source`` or applicatin default SSL credentials.
127-
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
127+
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
128128
Deprecated. A callback to provide client SSL certificate bytes and
129129
private key bytes, both in PEM format. It is ignored if
130130
``api_mtls_endpoint`` is None.
@@ -136,10 +136,10 @@ class {{ service.grpc_asyncio_transport_name }}({{ service.name }}Transport):
136136
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
137137
quota_project_id (Optional[str]): An optional project to use for billing
138138
and quota.
139-
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
140-
The client info used to send a user-agent string along with
141-
API requests. If ``None``, then default info will be used.
142-
Generally, you only need to set this if you're developing
139+
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
140+
The client info used to send a user-agent string along with
141+
API requests. If ``None``, then default info will be used.
142+
Generally, you only need to set this if you're developing
143143
your own client library.
144144

145145
Raises:
@@ -154,7 +154,7 @@ class {{ service.grpc_asyncio_transport_name }}({{ service.name }}Transport):
154154
{%- if service.has_lro %}
155155
self._operations_client = None
156156
{%- endif %}
157-
157+
158158
if api_mtls_endpoint:
159159
warnings.warn("api_mtls_endpoint is deprecated", DeprecationWarning)
160160
if client_cert_source:
@@ -179,7 +179,7 @@ class {{ service.grpc_asyncio_transport_name }}({{ service.name }}Transport):
179179
)
180180
else:
181181
self._ssl_channel_credentials = SslCredentials().ssl_credentials
182-
182+
183183
else:
184184
if client_cert_source_for_mtls and not ssl_channel_credentials:
185185
cert, key = client_cert_source_for_mtls()
@@ -353,7 +353,7 @@ class {{ service.grpc_asyncio_transport_name }}({{ service.name }}Transport):
353353
response_deserializer=iam_policy.TestIamPermissionsResponse.FromString,
354354
)
355355
return self._stubs["test_iam_permissions"]
356-
{% endif %}
356+
{% endif %}
357357

358358
__all__ = (
359359
'{{ service.name }}GrpcAsyncIOTransport',

gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/rest.py.j2

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class {{ service.name }}RestTransport({{ service.name }}Transport):
6262
credentials identify the application to the service; if none
6363
are specified, the client will attempt to ascertain the
6464
credentials from the environment.
65-
65+
6666
credentials_file (Optional[str]): A file with credentials that can
6767
be loaded with :func:`google.auth.load_credentials_from_file`.
6868
This argument is ignored if ``channel`` is provided.
@@ -73,10 +73,10 @@ class {{ service.name }}RestTransport({{ service.name }}Transport):
7373
if ``channel`` is provided.
7474
quota_project_id (Optional[str]): An optional project to use for billing
7575
and quota.
76-
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
77-
The client info used to send a user-agent string along with
78-
API requests. If ``None``, then default info will be used.
79-
Generally, you only need to set this if you're developing
76+
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
77+
The client info used to send a user-agent string along with
78+
API requests. If ``None``, then default info will be used.
79+
Generally, you only need to set this if you're developing
8080
your own client library.
8181
"""
8282
# Run the base constructor
@@ -97,7 +97,7 @@ class {{ service.name }}RestTransport({{ service.name }}Transport):
9797
self._prep_wrapped_messages(client_info)
9898

9999
{%- if service.has_lro %}
100-
100+
101101
@property
102102
def operations_client(self) -> operations_v1.OperationsClient:
103103
"""Create the client designed to process long-running operations.
@@ -152,7 +152,7 @@ class {{ service.name }}RestTransport({{ service.name }}Transport):
152152
{%- endif %}
153153
"""
154154

155-
{# TODO(yon-mg): refactor when implementing grpc transcoding
155+
{# TODO(yon-mg): refactor when implementing grpc transcoding
156156
- parse request pb & assign body, path params
157157
- shove leftovers into query params
158158
- make sure dotted nested fields preserved

0 commit comments

Comments
 (0)