Skip to content

Commit e42edbc

Browse files
fix: Allow Protobuf 5.x (#12869)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 649277844 Source-Link: googleapis/googleapis@fd7efa2 Source-Link: googleapis/googleapis-gen@50be251 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJlY2FwdGNoYS1lbnRlcnByaXNlLy5Pd2xCb3QueWFtbCIsImgiOiI1MGJlMjUxMzI5ZDhkYjViNTU1NjI2ZWJkNDg4NjcyMWY1NDdkM2NjIn0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJlY29tbWVuZGF0aW9ucy1haS8uT3dsQm90LnlhbWwiLCJoIjoiNTBiZTI1MTMyOWQ4ZGI1YjU1NTYyNmViZDQ4ODY3MjFmNTQ3ZDNjYyJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJlY29tbWVuZGVyLy5Pd2xCb3QueWFtbCIsImgiOiI1MGJlMjUxMzI5ZDhkYjViNTU1NjI2ZWJkNDg4NjcyMWY1NDdkM2NjIn0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJlZGlzLWNsdXN0ZXIvLk93bEJvdC55YW1sIiwiaCI6IjUwYmUyNTEzMjlkOGRiNWI1NTU2MjZlYmQ0ODg2NzIxZjU0N2QzY2MifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJlZGlzLy5Pd2xCb3QueWFtbCIsImgiOiI1MGJlMjUxMzI5ZDhkYjViNTU1NjI2ZWJkNDg4NjcyMWY1NDdkM2NjIn0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJlc291cmNlLW1hbmFnZXIvLk93bEJvdC55YW1sIiwiaCI6IjUwYmUyNTEzMjlkOGRiNWI1NTU2MjZlYmQ0ODg2NzIxZjU0N2QzY2MifQ== Copy-Tag: eyJwIjoicGFja2FnZXMv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l-bot[bot]@users.noreply.github.com> Co-authored-by: ohmayr <[email protected]>
1 parent 73b35d5 commit e42edbc

File tree

442 files changed

+2382
-4387
lines changed

Some content is hidden

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

442 files changed

+2382
-4387
lines changed

packages/google-cloud-recaptcha-enterprise/google/cloud/recaptchaenterprise/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.21.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-recaptcha-enterprise/google/cloud/recaptchaenterprise_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.21.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-recaptcha-enterprise/google/cloud/recaptchaenterprise_v1/services/recaptcha_enterprise_service/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-recaptcha-enterprise/google/cloud/recaptchaenterprise_v1/services/recaptcha_enterprise_service/transports/grpc.py

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

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

packages/google-cloud-recaptcha-enterprise/google/cloud/recaptchaenterprise_v1/services/recaptcha_enterprise_service/transports/grpc_asyncio.py

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

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

packages/google-cloud-recaptcha-enterprise/samples/generated_samples/snippet_metadata_google.cloud.recaptchaenterprise.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-recaptcha-enterprise",
11-
"version": "1.21.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-recaptcha-enterprise/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
# See https://github.com/googleapis/google-cloud-python/issues/12364
4747
"google-auth >= 2.14.1, <3.0.0dev,!=2.24.0,!=2.25.0",
4848
"proto-plus >= 1.22.3, <2.0.0dev",
49-
"protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5",
49+
"protobuf>=3.20.2,<6.0.0dev,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5",
5050
]
5151
url = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-recaptcha-enterprise"
5252

packages/google-cloud-recaptcha-enterprise/testing/constraints-3.7.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
google-api-core==1.34.1
88
google-auth==2.14.1
99
proto-plus==1.22.3
10-
protobuf==3.19.5
10+
protobuf==3.20.2

packages/google-cloud-recaptcha-enterprise/tests/unit/gapic/recaptchaenterprise_v1/test_recaptcha_enterprise_service.py

Lines changed: 19 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,12 +1328,7 @@ async def test_create_assessment_async_use_cached_wrapped_rpc(
13281328
)
13291329

13301330
# Replace cached wrapped function with mock
1331-
class AwaitableMock(mock.AsyncMock):
1332-
def __await__(self):
1333-
self.await_count += 1
1334-
return iter([])
1335-
1336-
mock_object = AwaitableMock()
1331+
mock_object = mock.AsyncMock()
13371332
client._client._transport._wrapped_methods[
13381333
client._client._transport.create_assessment
13391334
] = mock_object
@@ -1727,12 +1722,7 @@ async def test_annotate_assessment_async_use_cached_wrapped_rpc(
17271722
)
17281723

17291724
# Replace cached wrapped function with mock
1730-
class AwaitableMock(mock.AsyncMock):
1731-
def __await__(self):
1732-
self.await_count += 1
1733-
return iter([])
1734-
1735-
mock_object = AwaitableMock()
1725+
mock_object = mock.AsyncMock()
17361726
client._client._transport._wrapped_methods[
17371727
client._client._transport.annotate_assessment
17381728
] = mock_object
@@ -2115,12 +2105,7 @@ async def test_create_key_async_use_cached_wrapped_rpc(transport: str = "grpc_as
21152105
)
21162106

21172107
# Replace cached wrapped function with mock
2118-
class AwaitableMock(mock.AsyncMock):
2119-
def __await__(self):
2120-
self.await_count += 1
2121-
return iter([])
2122-
2123-
mock_object = AwaitableMock()
2108+
mock_object = mock.AsyncMock()
21242109
client._client._transport._wrapped_methods[
21252110
client._client._transport.create_key
21262111
] = mock_object
@@ -2496,12 +2481,7 @@ async def test_list_keys_async_use_cached_wrapped_rpc(transport: str = "grpc_asy
24962481
)
24972482

24982483
# Replace cached wrapped function with mock
2499-
class AwaitableMock(mock.AsyncMock):
2500-
def __await__(self):
2501-
self.await_count += 1
2502-
return iter([])
2503-
2504-
mock_object = AwaitableMock()
2484+
mock_object = mock.AsyncMock()
25052485
client._client._transport._wrapped_methods[
25062486
client._client._transport.list_keys
25072487
] = mock_object
@@ -3068,12 +3048,7 @@ async def test_retrieve_legacy_secret_key_async_use_cached_wrapped_rpc(
30683048
)
30693049

30703050
# Replace cached wrapped function with mock
3071-
class AwaitableMock(mock.AsyncMock):
3072-
def __await__(self):
3073-
self.await_count += 1
3074-
return iter([])
3075-
3076-
mock_object = AwaitableMock()
3051+
mock_object = mock.AsyncMock()
30773052
client._client._transport._wrapped_methods[
30783053
client._client._transport.retrieve_legacy_secret_key
30793054
] = mock_object
@@ -3449,12 +3424,7 @@ async def test_get_key_async_use_cached_wrapped_rpc(transport: str = "grpc_async
34493424
)
34503425

34513426
# Replace cached wrapped function with mock
3452-
class AwaitableMock(mock.AsyncMock):
3453-
def __await__(self):
3454-
self.await_count += 1
3455-
return iter([])
3456-
3457-
mock_object = AwaitableMock()
3427+
mock_object = mock.AsyncMock()
34583428
client._client._transport._wrapped_methods[
34593429
client._client._transport.get_key
34603430
] = mock_object
@@ -3817,12 +3787,7 @@ async def test_update_key_async_use_cached_wrapped_rpc(transport: str = "grpc_as
38173787
)
38183788

38193789
# Replace cached wrapped function with mock
3820-
class AwaitableMock(mock.AsyncMock):
3821-
def __await__(self):
3822-
self.await_count += 1
3823-
return iter([])
3824-
3825-
mock_object = AwaitableMock()
3790+
mock_object = mock.AsyncMock()
38263791
client._client._transport._wrapped_methods[
38273792
client._client._transport.update_key
38283793
] = mock_object
@@ -4189,12 +4154,7 @@ async def test_delete_key_async_use_cached_wrapped_rpc(transport: str = "grpc_as
41894154
)
41904155

41914156
# Replace cached wrapped function with mock
4192-
class AwaitableMock(mock.AsyncMock):
4193-
def __await__(self):
4194-
self.await_count += 1
4195-
return iter([])
4196-
4197-
mock_object = AwaitableMock()
4157+
mock_object = mock.AsyncMock()
41984158
client._client._transport._wrapped_methods[
41994159
client._client._transport.delete_key
42004160
] = mock_object
@@ -4552,12 +4512,7 @@ async def test_migrate_key_async_use_cached_wrapped_rpc(
45524512
)
45534513

45544514
# Replace cached wrapped function with mock
4555-
class AwaitableMock(mock.AsyncMock):
4556-
def __await__(self):
4557-
self.await_count += 1
4558-
return iter([])
4559-
4560-
mock_object = AwaitableMock()
4515+
mock_object = mock.AsyncMock()
45614516
client._client._transport._wrapped_methods[
45624517
client._client._transport.migrate_key
45634518
] = mock_object
@@ -4841,12 +4796,7 @@ async def test_get_metrics_async_use_cached_wrapped_rpc(
48414796
)
48424797

48434798
# Replace cached wrapped function with mock
4844-
class AwaitableMock(mock.AsyncMock):
4845-
def __await__(self):
4846-
self.await_count += 1
4847-
return iter([])
4848-
4849-
mock_object = AwaitableMock()
4799+
mock_object = mock.AsyncMock()
48504800
client._client._transport._wrapped_methods[
48514801
client._client._transport.get_metrics
48524802
] = mock_object
@@ -5232,12 +5182,7 @@ async def test_create_firewall_policy_async_use_cached_wrapped_rpc(
52325182
)
52335183

52345184
# Replace cached wrapped function with mock
5235-
class AwaitableMock(mock.AsyncMock):
5236-
def __await__(self):
5237-
self.await_count += 1
5238-
return iter([])
5239-
5240-
mock_object = AwaitableMock()
5185+
mock_object = mock.AsyncMock()
52415186
client._client._transport._wrapped_methods[
52425187
client._client._transport.create_firewall_policy
52435188
] = mock_object
@@ -5643,12 +5588,7 @@ async def test_list_firewall_policies_async_use_cached_wrapped_rpc(
56435588
)
56445589

56455590
# Replace cached wrapped function with mock
5646-
class AwaitableMock(mock.AsyncMock):
5647-
def __await__(self):
5648-
self.await_count += 1
5649-
return iter([])
5650-
5651-
mock_object = AwaitableMock()
5591+
mock_object = mock.AsyncMock()
56525592
client._client._transport._wrapped_methods[
56535593
client._client._transport.list_firewall_policies
56545594
] = mock_object
@@ -6242,12 +6182,7 @@ async def test_get_firewall_policy_async_use_cached_wrapped_rpc(
62426182
)
62436183

62446184
# Replace cached wrapped function with mock
6245-
class AwaitableMock(mock.AsyncMock):
6246-
def __await__(self):
6247-
self.await_count += 1
6248-
return iter([])
6249-
6250-
mock_object = AwaitableMock()
6185+
mock_object = mock.AsyncMock()
62516186
client._client._transport._wrapped_methods[
62526187
client._client._transport.get_firewall_policy
62536188
] = mock_object
@@ -6646,12 +6581,7 @@ async def test_update_firewall_policy_async_use_cached_wrapped_rpc(
66466581
)
66476582

66486583
# Replace cached wrapped function with mock
6649-
class AwaitableMock(mock.AsyncMock):
6650-
def __await__(self):
6651-
self.await_count += 1
6652-
return iter([])
6653-
6654-
mock_object = AwaitableMock()
6584+
mock_object = mock.AsyncMock()
66556585
client._client._transport._wrapped_methods[
66566586
client._client._transport.update_firewall_policy
66576587
] = mock_object
@@ -7048,12 +6978,7 @@ async def test_delete_firewall_policy_async_use_cached_wrapped_rpc(
70486978
)
70496979

70506980
# Replace cached wrapped function with mock
7051-
class AwaitableMock(mock.AsyncMock):
7052-
def __await__(self):
7053-
self.await_count += 1
7054-
return iter([])
7055-
7056-
mock_object = AwaitableMock()
6981+
mock_object = mock.AsyncMock()
70576982
client._client._transport._wrapped_methods[
70586983
client._client._transport.delete_firewall_policy
70596984
] = mock_object
@@ -7427,12 +7352,7 @@ async def test_reorder_firewall_policies_async_use_cached_wrapped_rpc(
74277352
)
74287353

74297354
# Replace cached wrapped function with mock
7430-
class AwaitableMock(mock.AsyncMock):
7431-
def __await__(self):
7432-
self.await_count += 1
7433-
return iter([])
7434-
7435-
mock_object = AwaitableMock()
7355+
mock_object = mock.AsyncMock()
74367356
client._client._transport._wrapped_methods[
74377357
client._client._transport.reorder_firewall_policies
74387358
] = mock_object
@@ -7829,12 +7749,7 @@ async def test_list_related_account_groups_async_use_cached_wrapped_rpc(
78297749
)
78307750

78317751
# Replace cached wrapped function with mock
7832-
class AwaitableMock(mock.AsyncMock):
7833-
def __await__(self):
7834-
self.await_count += 1
7835-
return iter([])
7836-
7837-
mock_object = AwaitableMock()
7752+
mock_object = mock.AsyncMock()
78387753
client._client._transport._wrapped_methods[
78397754
client._client._transport.list_related_account_groups
78407755
] = mock_object
@@ -8432,12 +8347,7 @@ async def test_list_related_account_group_memberships_async_use_cached_wrapped_r
84328347
)
84338348

84348349
# Replace cached wrapped function with mock
8435-
class AwaitableMock(mock.AsyncMock):
8436-
def __await__(self):
8437-
self.await_count += 1
8438-
return iter([])
8439-
8440-
mock_object = AwaitableMock()
8350+
mock_object = mock.AsyncMock()
84418351
client._client._transport._wrapped_methods[
84428352
client._client._transport.list_related_account_group_memberships
84438353
] = mock_object
@@ -9049,12 +8959,7 @@ async def test_search_related_account_group_memberships_async_use_cached_wrapped
90498959
)
90508960

90518961
# Replace cached wrapped function with mock
9052-
class AwaitableMock(mock.AsyncMock):
9053-
def __await__(self):
9054-
self.await_count += 1
9055-
return iter([])
9056-
9057-
mock_object = AwaitableMock()
8962+
mock_object = mock.AsyncMock()
90588963
client._client._transport._wrapped_methods[
90598964
client._client._transport.search_related_account_group_memberships
90608965
] = mock_object

packages/google-cloud-recommendations-ai/README.rst

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

2121
Quick Start

0 commit comments

Comments
 (0)