Skip to content

Commit 4d16761

Browse files
fix: Allow Protobuf 5.x (#12870)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 649277844 Source-Link: googleapis/googleapis@fd7efa2 Source-Link: googleapis/googleapis-gen@50be251 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNwZWVjaC8uT3dsQm90LnlhbWwiLCJoIjoiNTBiZTI1MTMyOWQ4ZGI1YjU1NTYyNmViZDQ4ODY3MjFmNTQ3ZDNjYyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXN0b3JhZ2UtY29udHJvbC8uT3dsQm90LnlhbWwiLCJoIjoiNTBiZTI1MTMyOWQ4ZGI1YjU1NTYyNmViZDQ4ODY3MjFmNTQ3ZDNjYyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXN0b3JhZ2UtdHJhbnNmZXIvLk93bEJvdC55YW1sIiwiaCI6IjUwYmUyNTEzMjlkOGRiNWI1NTU2MjZlYmQ0ODg2NzIxZjU0N2QzY2MifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXN0b3JhZ2VpbnNpZ2h0cy8uT3dsQm90LnlhbWwiLCJoIjoiNTBiZTI1MTMyOWQ4ZGI1YjU1NTYyNmViZDQ4ODY3MjFmNTQ3ZDNjYyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXN1cHBvcnQvLk93bEJvdC55YW1sIiwiaCI6IjUwYmUyNTEzMjlkOGRiNWI1NTU2MjZlYmQ0ODg2NzIxZjU0N2QzY2MifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRhbGVudC8uT3dsQm90LnlhbWwiLCJoIjoiNTBiZTI1MTMyOWQ4ZGI1YjU1NTYyNmViZDQ4ODY3MjFmNTQ3ZDNjYyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2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ou <[email protected]>
1 parent 7f9dedb commit 4d16761

File tree

381 files changed

+2423
-5406
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

381 files changed

+2423
-5406
lines changed

packages/google-cloud-speech/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Python Client for Cloud Speech
1515
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-speech.svg
1616
:target: https://pypi.org/project/google-cloud-speech/
1717
.. _Cloud Speech: https://cloud.google.com/speech-to-text/docs/
18-
.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/speech/latest
18+
.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/speech/latest/summary_overview
1919
.. _Product Documentation: https://cloud.google.com/speech-to-text/docs/
2020

2121
Quick Start

packages/google-cloud-speech/docs/index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,8 @@ For a list of all ``google-cloud-speech`` releases:
4040
:maxdepth: 2
4141

4242
CHANGELOG
43+
44+
.. toctree::
45+
:hidden:
46+
47+
summary_overview.md
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[
2+
This is a templated file. Adding content to this file may result in it being
3+
reverted. Instead, if you want to place additional content, create an
4+
"overview_content.md" file in `docs/` directory. The Sphinx tool will
5+
pick up on the content and merge the content.
6+
]: #
7+
8+
# Cloud Speech API
9+
10+
Overview of the APIs available for Cloud Speech API.
11+
12+
## All entries
13+
14+
Classes, methods and properties & attributes for
15+
Cloud Speech API.
16+
17+
[classes](https://cloud.google.com/python/docs/reference/speech/latest/summary_class.html)
18+
19+
[methods](https://cloud.google.com/python/docs/reference/speech/latest/summary_method.html)
20+
21+
[properties and
22+
attributes](https://cloud.google.com/python/docs/reference/speech/latest/summary_property.html)

packages/google-cloud-speech/google/cloud/speech_v1/services/adaptation/transports/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ def __init__(
8383

8484
# Save the scopes.
8585
self._scopes = scopes
86+
if not hasattr(self, "_ignore_credentials"):
87+
self._ignore_credentials: bool = False
8688

8789
# If no credentials are provided, then determine the appropriate
8890
# defaults.
@@ -95,7 +97,7 @@ def __init__(
9597
credentials, _ = google.auth.load_credentials_from_file(
9698
credentials_file, **scopes_kwargs, quota_project_id=quota_project_id
9799
)
98-
elif credentials is None:
100+
elif credentials is None and not self._ignore_credentials:
99101
credentials, _ = google.auth.default(
100102
**scopes_kwargs, quota_project_id=quota_project_id
101103
)

packages/google-cloud-speech/google/cloud/speech_v1/services/adaptation/transports/grpc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ def __init__(
123123

124124
if isinstance(channel, grpc.Channel):
125125
# Ignore credentials if a channel was passed.
126-
credentials = False
126+
credentials = None
127+
self._ignore_credentials = True
127128
# If a channel was explicitly provided, set it.
128129
self._grpc_channel = channel
129130
self._ssl_channel_credentials = None

packages/google-cloud-speech/google/cloud/speech_v1/services/adaptation/transports/grpc_asyncio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ def __init__(
170170

171171
if isinstance(channel, aio.Channel):
172172
# Ignore credentials if a channel was passed.
173-
credentials = False
173+
credentials = None
174+
self._ignore_credentials = True
174175
# If a channel was explicitly provided, set it.
175176
self._grpc_channel = channel
176177
self._ssl_channel_credentials = None

packages/google-cloud-speech/google/cloud/speech_v1/services/speech/transports/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ def __init__(
8282

8383
# Save the scopes.
8484
self._scopes = scopes
85+
if not hasattr(self, "_ignore_credentials"):
86+
self._ignore_credentials: bool = False
8587

8688
# If no credentials are provided, then determine the appropriate
8789
# defaults.
@@ -94,7 +96,7 @@ def __init__(
9496
credentials, _ = google.auth.load_credentials_from_file(
9597
credentials_file, **scopes_kwargs, quota_project_id=quota_project_id
9698
)
97-
elif credentials is None:
99+
elif credentials is None and not self._ignore_credentials:
98100
credentials, _ = google.auth.default(
99101
**scopes_kwargs, quota_project_id=quota_project_id
100102
)

packages/google-cloud-speech/google/cloud/speech_v1/services/speech/transports/grpc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ def __init__(
123123

124124
if isinstance(channel, grpc.Channel):
125125
# Ignore credentials if a channel was passed.
126-
credentials = False
126+
credentials = None
127+
self._ignore_credentials = True
127128
# If a channel was explicitly provided, set it.
128129
self._grpc_channel = channel
129130
self._ssl_channel_credentials = None

packages/google-cloud-speech/google/cloud/speech_v1/services/speech/transports/grpc_asyncio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ def __init__(
170170

171171
if isinstance(channel, aio.Channel):
172172
# Ignore credentials if a channel was passed.
173-
credentials = False
173+
credentials = None
174+
self._ignore_credentials = True
174175
# If a channel was explicitly provided, set it.
175176
self._grpc_channel = channel
176177
self._ssl_channel_credentials = None

packages/google-cloud-speech/google/cloud/speech_v1p1beta1/services/adaptation/transports/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ def __init__(
8383

8484
# Save the scopes.
8585
self._scopes = scopes
86+
if not hasattr(self, "_ignore_credentials"):
87+
self._ignore_credentials: bool = False
8688

8789
# If no credentials are provided, then determine the appropriate
8890
# defaults.
@@ -95,7 +97,7 @@ def __init__(
9597
credentials, _ = google.auth.load_credentials_from_file(
9698
credentials_file, **scopes_kwargs, quota_project_id=quota_project_id
9799
)
98-
elif credentials is None:
100+
elif credentials is None and not self._ignore_credentials:
99101
credentials, _ = google.auth.default(
100102
**scopes_kwargs, quota_project_id=quota_project_id
101103
)

0 commit comments

Comments
 (0)