From 125df142f6ef5022f84d3a6f4f88ea1699228f4d Mon Sep 17 00:00:00 2001 From: pacrob <5199899+pacrob@users.noreply.github.com> Date: Thu, 4 Jul 2024 13:49:34 -0600 Subject: [PATCH] bump protobufs dep to >= 5.27.2 and rebuild protobufs definitions with protoc 27.2 --- docs/contributing.rst | 2 +- libp2p/crypto/pb/crypto_pb2.py | 16 +++++++++++++--- libp2p/identity/identify/pb/identify_pb2.py | 16 +++++++++++++--- libp2p/pubsub/pb/rpc_pb2.py | 16 +++++++++++++--- libp2p/security/insecure/pb/plaintext_pb2.py | 16 +++++++++++++--- libp2p/security/noise/pb/noise_pb2.py | 16 +++++++++++++--- libp2p/security/secio/pb/spipe_pb2.py | 16 +++++++++++++--- newsfragments/473.internal.rst | 1 + setup.py | 2 +- 9 files changed, 81 insertions(+), 20 deletions(-) create mode 100644 newsfragments/473.internal.rst diff --git a/docs/contributing.rst b/docs/contributing.rst index 2b21167d..6a7c3603 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -41,7 +41,7 @@ Requirements ^^^^^^^^^^^^ The protobuf description in this repository was generated by ``protoc`` at version -``25.3``. +``27.2``. Testing ~~~~~~~ diff --git a/libp2p/crypto/pb/crypto_pb2.py b/libp2p/crypto/pb/crypto_pb2.py index 5d72b604..a23dbed6 100644 --- a/libp2p/crypto/pb/crypto_pb2.py +++ b/libp2p/crypto/pb/crypto_pb2.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: libp2p/crypto/pb/crypto.proto -# Protobuf Python Version: 4.25.3 +# Protobuf Python Version: 5.27.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 27, + 2, + '', + 'libp2p/crypto/pb/crypto.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -19,8 +29,8 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dlibp2p/crypto/ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'libp2p.crypto.pb.crypto_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None +if not _descriptor._USE_C_DESCRIPTORS: + DESCRIPTOR._loaded_options = None _globals['_KEYTYPE']._serialized_start=175 _globals['_KEYTYPE']._serialized_end=246 _globals['_PUBLICKEY']._serialized_start=44 diff --git a/libp2p/identity/identify/pb/identify_pb2.py b/libp2p/identity/identify/pb/identify_pb2.py index 67248619..60f11642 100644 --- a/libp2p/identity/identify/pb/identify_pb2.py +++ b/libp2p/identity/identify/pb/identify_pb2.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: libp2p/identity/identify/pb/identify.proto -# Protobuf Python Version: 4.25.3 +# Protobuf Python Version: 5.27.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 27, + 2, + '', + 'libp2p/identity/identify/pb/identify.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -19,8 +29,8 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*libp2p/identity/i _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'libp2p.identity.identify.pb.identify_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None +if not _descriptor._USE_C_DESCRIPTORS: + DESCRIPTOR._loaded_options = None _globals['_IDENTIFY']._serialized_start=60 _globals['_IDENTIFY']._serialized_end=203 # @@protoc_insertion_point(module_scope) diff --git a/libp2p/pubsub/pb/rpc_pb2.py b/libp2p/pubsub/pb/rpc_pb2.py index 397edf87..9a34c74f 100644 --- a/libp2p/pubsub/pb/rpc_pb2.py +++ b/libp2p/pubsub/pb/rpc_pb2.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: libp2p/pubsub/pb/rpc.proto -# Protobuf Python Version: 4.25.3 +# Protobuf Python Version: 5.27.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 27, + 2, + '', + 'libp2p/pubsub/pb/rpc.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -19,8 +29,8 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1alibp2p/pubsub/ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'libp2p.pubsub.pb.rpc_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None +if not _descriptor._USE_C_DESCRIPTORS: + DESCRIPTOR._loaded_options = None _globals['_RPC']._serialized_start=42 _globals['_RPC']._serialized_end=222 _globals['_RPC_SUBOPTS']._serialized_start=177 diff --git a/libp2p/security/insecure/pb/plaintext_pb2.py b/libp2p/security/insecure/pb/plaintext_pb2.py index c04fc603..74b42ee8 100644 --- a/libp2p/security/insecure/pb/plaintext_pb2.py +++ b/libp2p/security/insecure/pb/plaintext_pb2.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: libp2p/security/insecure/pb/plaintext.proto -# Protobuf Python Version: 4.25.3 +# Protobuf Python Version: 5.27.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 27, + 2, + '', + 'libp2p/security/insecure/pb/plaintext.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -20,8 +30,8 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n+libp2p/security/i _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'libp2p.security.insecure.pb.plaintext_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None +if not _descriptor._USE_C_DESCRIPTORS: + DESCRIPTOR._loaded_options = None _globals['_EXCHANGE']._serialized_start=92 _globals['_EXCHANGE']._serialized_end=152 # @@protoc_insertion_point(module_scope) diff --git a/libp2p/security/noise/pb/noise_pb2.py b/libp2p/security/noise/pb/noise_pb2.py index 45e3d6c0..1efb7759 100644 --- a/libp2p/security/noise/pb/noise_pb2.py +++ b/libp2p/security/noise/pb/noise_pb2.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: libp2p/security/noise/pb/noise.proto -# Protobuf Python Version: 4.25.3 +# Protobuf Python Version: 5.27.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 27, + 2, + '', + 'libp2p/security/noise/pb/noise.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -19,8 +29,8 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$libp2p/security/n _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'libp2p.security.noise.pb.noise_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None +if not _descriptor._USE_C_DESCRIPTORS: + DESCRIPTOR._loaded_options = None _globals['_NOISEHANDSHAKEPAYLOAD']._serialized_start=44 _globals['_NOISEHANDSHAKEPAYLOAD']._serialized_end=125 # @@protoc_insertion_point(module_scope) diff --git a/libp2p/security/secio/pb/spipe_pb2.py b/libp2p/security/secio/pb/spipe_pb2.py index 32636112..c2a9b874 100644 --- a/libp2p/security/secio/pb/spipe_pb2.py +++ b/libp2p/security/secio/pb/spipe_pb2.py @@ -1,12 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE # source: libp2p/security/secio/pb/spipe.proto -# Protobuf Python Version: 4.25.3 +# Protobuf Python Version: 5.27.2 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 27, + 2, + '', + 'libp2p/security/secio/pb/spipe.proto' +) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -19,8 +29,8 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n$libp2p/security/s _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'libp2p.security.secio.pb.spipe_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None +if not _descriptor._USE_C_DESCRIPTORS: + DESCRIPTOR._loaded_options = None _globals['_PROPOSE']._serialized_start=50 _globals['_PROPOSE']._serialized_end=145 _globals['_EXCHANGE']._serialized_start=147 diff --git a/newsfragments/473.internal.rst b/newsfragments/473.internal.rst new file mode 100644 index 00000000..4996a657 --- /dev/null +++ b/newsfragments/473.internal.rst @@ -0,0 +1 @@ +Bump ``protobufs`` dep to ``>=5.27.2`` and rebuild protobuf definition with ``protoc==27.2`` diff --git a/setup.py b/setup.py index e3ce17d3..b40b8ff9 100644 --- a/setup.py +++ b/setup.py @@ -60,7 +60,7 @@ install_requires = [ "multiaddr>=0.0.9", "mypy-protobuf>=3.0.0", "noiseprotocol>=0.3.0", - "protobuf>=3.10.0", + "protobuf>=5.27.0", "pycryptodome>=3.9.2", "pymultihash>=0.8.2", "pynacl>=1.3.0",