From 3a5ec5078145f746a1a59c314bedeef6fded16c9 Mon Sep 17 00:00:00 2001 From: CloudQuery Bot <102256036+cq-bot@users.noreply.github.com> Date: Tue, 7 May 2024 11:02:21 +0300 Subject: [PATCH] fix: Generate Python Code from `plugin-pb` (#82) This PR was created by a scheduled workflow to regenerate the Python code from `plugin-pb`. --- cloudquery/discovery_v1/discovery_pb2.py | 6 +- cloudquery/discovery_v1/discovery_pb2_grpc.py | 43 +++- cloudquery/plugin_v3/plugin_pb2.py | 8 +- cloudquery/plugin_v3/plugin_pb2_grpc.py | 187 ++++++++++++++---- 4 files changed, 197 insertions(+), 47 deletions(-) diff --git a/cloudquery/discovery_v1/discovery_pb2.py b/cloudquery/discovery_v1/discovery_pb2.py index bd982b2..b680c71 100644 --- a/cloudquery/discovery_v1/discovery_pb2.py +++ b/cloudquery/discovery_v1/discovery_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: cloudquery/discovery_v1/discovery.proto -# Protobuf Python Version: 4.25.1 +# Protobuf Python Version: 5.26.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -19,8 +19,8 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'cloudquery.discovery_v1.discovery_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\n\032io.cloudquery.discovery.v1P\001Z={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + + f' This warning will become an error in {EXPECTED_ERROR_RELEASE},' + + f' scheduled for release on {SCHEDULED_RELEASE_DATE}.', + RuntimeWarning + ) + class DiscoveryStub(object): """Missing associated documentation comment in .proto file.""" @@ -18,7 +43,7 @@ def __init__(self, channel): '/cloudquery.discovery.v1.Discovery/GetVersions', request_serializer=cloudquery_dot_discovery__v1_dot_discovery__pb2.GetVersions.Request.SerializeToString, response_deserializer=cloudquery_dot_discovery__v1_dot_discovery__pb2.GetVersions.Response.FromString, - ) + _registered_method=True) class DiscoveryServicer(object): @@ -60,8 +85,18 @@ def GetVersions(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/cloudquery.discovery.v1.Discovery/GetVersions', + return grpc.experimental.unary_unary( + request, + target, + '/cloudquery.discovery.v1.Discovery/GetVersions', cloudquery_dot_discovery__v1_dot_discovery__pb2.GetVersions.Request.SerializeToString, cloudquery_dot_discovery__v1_dot_discovery__pb2.GetVersions.Response.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/cloudquery/plugin_v3/plugin_pb2.py b/cloudquery/plugin_v3/plugin_pb2.py index edf4256..823e730 100644 --- a/cloudquery/plugin_v3/plugin_pb2.py +++ b/cloudquery/plugin_v3/plugin_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: cloudquery/plugin_v3/plugin.proto -# Protobuf Python Version: 4.25.1 +# Protobuf Python Version: 5.26.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -20,10 +20,10 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'cloudquery.plugin_v3.plugin_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - _globals['DESCRIPTOR']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None _globals['DESCRIPTOR']._serialized_options = b'\n\027io.cloudquery.plugin.v3P\001Z6github.com/cloudquery/plugin-pb-go/pb/plugin/v3;plugin' - _globals['_WRITE_MESSAGEDELETESTALE'].fields_by_name['table']._options = None + _globals['_WRITE_MESSAGEDELETESTALE'].fields_by_name['table']._loaded_options = None _globals['_WRITE_MESSAGEDELETESTALE'].fields_by_name['table']._serialized_options = b'\030\001' _globals['_GETNAME']._serialized_start=92 _globals['_GETNAME']._serialized_end=138 diff --git a/cloudquery/plugin_v3/plugin_pb2_grpc.py b/cloudquery/plugin_v3/plugin_pb2_grpc.py index 5fe3d28..040ceb8 100644 --- a/cloudquery/plugin_v3/plugin_pb2_grpc.py +++ b/cloudquery/plugin_v3/plugin_pb2_grpc.py @@ -1,9 +1,34 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc +import warnings from cloudquery.plugin_v3 import plugin_pb2 as cloudquery_dot_plugin__v3_dot_plugin__pb2 +GRPC_GENERATED_VERSION = '1.63.0' +GRPC_VERSION = grpc.__version__ +EXPECTED_ERROR_RELEASE = '1.65.0' +SCHEDULED_RELEASE_DATE = 'June 25, 2024' +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + warnings.warn( + f'The grpc package installed is at version {GRPC_VERSION},' + + f' but the generated code in cloudquery/plugin_v3/plugin_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + + f' This warning will become an error in {EXPECTED_ERROR_RELEASE},' + + f' scheduled for release on {SCHEDULED_RELEASE_DATE}.', + RuntimeWarning + ) + class PluginStub(object): """Missing associated documentation comment in .proto file.""" @@ -18,47 +43,47 @@ def __init__(self, channel): '/cloudquery.plugin.v3.Plugin/GetName', request_serializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.GetName.Request.SerializeToString, response_deserializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.GetName.Response.FromString, - ) + _registered_method=True) self.GetVersion = channel.unary_unary( '/cloudquery.plugin.v3.Plugin/GetVersion', request_serializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.GetVersion.Request.SerializeToString, response_deserializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.GetVersion.Response.FromString, - ) + _registered_method=True) self.GetSpecSchema = channel.unary_unary( '/cloudquery.plugin.v3.Plugin/GetSpecSchema', request_serializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.GetSpecSchema.Request.SerializeToString, response_deserializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.GetSpecSchema.Response.FromString, - ) + _registered_method=True) self.Init = channel.unary_unary( '/cloudquery.plugin.v3.Plugin/Init', request_serializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.Init.Request.SerializeToString, response_deserializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.Init.Response.FromString, - ) + _registered_method=True) self.GetTables = channel.unary_unary( '/cloudquery.plugin.v3.Plugin/GetTables', request_serializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.GetTables.Request.SerializeToString, response_deserializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.GetTables.Response.FromString, - ) + _registered_method=True) self.Sync = channel.unary_stream( '/cloudquery.plugin.v3.Plugin/Sync', request_serializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.Sync.Request.SerializeToString, response_deserializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.Sync.Response.FromString, - ) + _registered_method=True) self.Read = channel.unary_stream( '/cloudquery.plugin.v3.Plugin/Read', request_serializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.Read.Request.SerializeToString, response_deserializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.Read.Response.FromString, - ) + _registered_method=True) self.Write = channel.stream_unary( '/cloudquery.plugin.v3.Plugin/Write', request_serializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.Write.Request.SerializeToString, response_deserializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.Write.Response.FromString, - ) + _registered_method=True) self.Close = channel.unary_unary( '/cloudquery.plugin.v3.Plugin/Close', request_serializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.Close.Request.SerializeToString, response_deserializer=cloudquery_dot_plugin__v3_dot_plugin__pb2.Close.Response.FromString, - ) + _registered_method=True) class PluginServicer(object): @@ -199,11 +224,21 @@ def GetName(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/cloudquery.plugin.v3.Plugin/GetName', + return grpc.experimental.unary_unary( + request, + target, + '/cloudquery.plugin.v3.Plugin/GetName', cloudquery_dot_plugin__v3_dot_plugin__pb2.GetName.Request.SerializeToString, cloudquery_dot_plugin__v3_dot_plugin__pb2.GetName.Response.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def GetVersion(request, @@ -216,11 +251,21 @@ def GetVersion(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/cloudquery.plugin.v3.Plugin/GetVersion', + return grpc.experimental.unary_unary( + request, + target, + '/cloudquery.plugin.v3.Plugin/GetVersion', cloudquery_dot_plugin__v3_dot_plugin__pb2.GetVersion.Request.SerializeToString, cloudquery_dot_plugin__v3_dot_plugin__pb2.GetVersion.Response.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def GetSpecSchema(request, @@ -233,11 +278,21 @@ def GetSpecSchema(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/cloudquery.plugin.v3.Plugin/GetSpecSchema', + return grpc.experimental.unary_unary( + request, + target, + '/cloudquery.plugin.v3.Plugin/GetSpecSchema', cloudquery_dot_plugin__v3_dot_plugin__pb2.GetSpecSchema.Request.SerializeToString, cloudquery_dot_plugin__v3_dot_plugin__pb2.GetSpecSchema.Response.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def Init(request, @@ -250,11 +305,21 @@ def Init(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/cloudquery.plugin.v3.Plugin/Init', + return grpc.experimental.unary_unary( + request, + target, + '/cloudquery.plugin.v3.Plugin/Init', cloudquery_dot_plugin__v3_dot_plugin__pb2.Init.Request.SerializeToString, cloudquery_dot_plugin__v3_dot_plugin__pb2.Init.Response.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def GetTables(request, @@ -267,11 +332,21 @@ def GetTables(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/cloudquery.plugin.v3.Plugin/GetTables', + return grpc.experimental.unary_unary( + request, + target, + '/cloudquery.plugin.v3.Plugin/GetTables', cloudquery_dot_plugin__v3_dot_plugin__pb2.GetTables.Request.SerializeToString, cloudquery_dot_plugin__v3_dot_plugin__pb2.GetTables.Response.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def Sync(request, @@ -284,11 +359,21 @@ def Sync(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_stream(request, target, '/cloudquery.plugin.v3.Plugin/Sync', + return grpc.experimental.unary_stream( + request, + target, + '/cloudquery.plugin.v3.Plugin/Sync', cloudquery_dot_plugin__v3_dot_plugin__pb2.Sync.Request.SerializeToString, cloudquery_dot_plugin__v3_dot_plugin__pb2.Sync.Response.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def Read(request, @@ -301,11 +386,21 @@ def Read(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_stream(request, target, '/cloudquery.plugin.v3.Plugin/Read', + return grpc.experimental.unary_stream( + request, + target, + '/cloudquery.plugin.v3.Plugin/Read', cloudquery_dot_plugin__v3_dot_plugin__pb2.Read.Request.SerializeToString, cloudquery_dot_plugin__v3_dot_plugin__pb2.Read.Response.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def Write(request_iterator, @@ -318,11 +413,21 @@ def Write(request_iterator, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.stream_unary(request_iterator, target, '/cloudquery.plugin.v3.Plugin/Write', + return grpc.experimental.stream_unary( + request_iterator, + target, + '/cloudquery.plugin.v3.Plugin/Write', cloudquery_dot_plugin__v3_dot_plugin__pb2.Write.Request.SerializeToString, cloudquery_dot_plugin__v3_dot_plugin__pb2.Write.Response.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def Close(request, @@ -335,8 +440,18 @@ def Close(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/cloudquery.plugin.v3.Plugin/Close', + return grpc.experimental.unary_unary( + request, + target, + '/cloudquery.plugin.v3.Plugin/Close', cloudquery_dot_plugin__v3_dot_plugin__pb2.Close.Request.SerializeToString, cloudquery_dot_plugin__v3_dot_plugin__pb2.Close.Response.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True)