Skip to content

Commit 3a5ec50

Browse files
authored
fix: Generate Python Code from plugin-pb (#82)
This PR was created by a scheduled workflow to regenerate the Python code from `plugin-pb`.
1 parent 0dc64c6 commit 3a5ec50

File tree

4 files changed

+197
-47
lines changed

4 files changed

+197
-47
lines changed

cloudquery/discovery_v1/discovery_pb2.py

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cloudquery/discovery_v1/discovery_pb2_grpc.py

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,34 @@
11
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
22
"""Client and server classes corresponding to protobuf-defined services."""
33
import grpc
4+
import warnings
45

56
from cloudquery.discovery_v1 import discovery_pb2 as cloudquery_dot_discovery__v1_dot_discovery__pb2
67

8+
GRPC_GENERATED_VERSION = '1.63.0'
9+
GRPC_VERSION = grpc.__version__
10+
EXPECTED_ERROR_RELEASE = '1.65.0'
11+
SCHEDULED_RELEASE_DATE = 'June 25, 2024'
12+
_version_not_supported = False
13+
14+
try:
15+
from grpc._utilities import first_version_is_lower
16+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
17+
except ImportError:
18+
_version_not_supported = True
19+
20+
if _version_not_supported:
21+
warnings.warn(
22+
f'The grpc package installed is at version {GRPC_VERSION},'
23+
+ f' but the generated code in cloudquery/discovery_v1/discovery_pb2_grpc.py depends on'
24+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
25+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
26+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
27+
+ f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
28+
+ f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
29+
RuntimeWarning
30+
)
31+
732

833
class DiscoveryStub(object):
934
"""Missing associated documentation comment in .proto file."""
@@ -18,7 +43,7 @@ def __init__(self, channel):
1843
'/cloudquery.discovery.v1.Discovery/GetVersions',
1944
request_serializer=cloudquery_dot_discovery__v1_dot_discovery__pb2.GetVersions.Request.SerializeToString,
2045
response_deserializer=cloudquery_dot_discovery__v1_dot_discovery__pb2.GetVersions.Response.FromString,
21-
)
46+
_registered_method=True)
2247

2348

2449
class DiscoveryServicer(object):
@@ -60,8 +85,18 @@ def GetVersions(request,
6085
wait_for_ready=None,
6186
timeout=None,
6287
metadata=None):
63-
return grpc.experimental.unary_unary(request, target, '/cloudquery.discovery.v1.Discovery/GetVersions',
88+
return grpc.experimental.unary_unary(
89+
request,
90+
target,
91+
'/cloudquery.discovery.v1.Discovery/GetVersions',
6492
cloudquery_dot_discovery__v1_dot_discovery__pb2.GetVersions.Request.SerializeToString,
6593
cloudquery_dot_discovery__v1_dot_discovery__pb2.GetVersions.Response.FromString,
66-
options, channel_credentials,
67-
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
94+
options,
95+
channel_credentials,
96+
insecure,
97+
call_credentials,
98+
compression,
99+
wait_for_ready,
100+
timeout,
101+
metadata,
102+
_registered_method=True)

cloudquery/plugin_v3/plugin_pb2.py

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)