Skip to content

Commit bb896da

Browse files
authored
Merge pull request #818 from varun-r-mallya/varun-r-mallya/protobuf-update
Update protobufs
2 parents d2fdf70 + af61523 commit bb896da

File tree

11 files changed

+139
-103
lines changed

11 files changed

+139
-103
lines changed

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ PYI = $(PB:.proto=_pb2.pyi)
6969
## Set default to `protobufs`, otherwise `format` is called when typing only `make`
7070
all: protobufs
7171

72+
.PHONY: protobufs clean-proto
73+
7274
protobufs: $(PY)
7375

7476
%_pb2.py: %.proto
@@ -77,6 +79,11 @@ protobufs: $(PY)
7779
clean-proto:
7880
rm -f $(PY) $(PYI)
7981

82+
# Force protobuf regeneration by making them always out of date
83+
$(PY): FORCE
84+
85+
FORCE:
86+
8087
# docs commands
8188

8289
docs: check-docs

libp2p/crypto/pb/crypto_pb2.py

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

libp2p/crypto/pb/crypto_pb2.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class _KeyTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTy
2828
Secp256k1: _KeyType.ValueType # 2
2929
ECDSA: _KeyType.ValueType # 3
3030
ECC_P256: _KeyType.ValueType # 4
31+
X25519: _KeyType.ValueType # 5
3132

3233
class KeyType(_KeyType, metaclass=_KeyTypeEnumTypeWrapper): ...
3334

@@ -36,6 +37,7 @@ Ed25519: KeyType.ValueType # 1
3637
Secp256k1: KeyType.ValueType # 2
3738
ECDSA: KeyType.ValueType # 3
3839
ECC_P256: KeyType.ValueType # 4
40+
X25519: KeyType.ValueType # 5
3941
global___KeyType = KeyType
4042

4143
@typing.final

libp2p/identity/identify/pb/identify_pb2.py

Lines changed: 6 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 47 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,49 @@
1-
from google.protobuf.internal import containers as _containers
2-
from google.protobuf import descriptor as _descriptor
3-
from google.protobuf import message as _message
4-
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Optional as _Optional
1+
"""
2+
@generated by mypy-protobuf. Do not edit manually!
3+
isort:skip_file
4+
"""
55

6-
DESCRIPTOR: _descriptor.FileDescriptor
6+
import builtins
7+
import collections.abc
8+
import google.protobuf.descriptor
9+
import google.protobuf.internal.containers
10+
import google.protobuf.message
11+
import typing
712

8-
class Identify(_message.Message):
9-
__slots__ = ("protocol_version", "agent_version", "public_key", "listen_addrs", "observed_addr", "protocols", "signedPeerRecord")
10-
PROTOCOL_VERSION_FIELD_NUMBER: _ClassVar[int]
11-
AGENT_VERSION_FIELD_NUMBER: _ClassVar[int]
12-
PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int]
13-
LISTEN_ADDRS_FIELD_NUMBER: _ClassVar[int]
14-
OBSERVED_ADDR_FIELD_NUMBER: _ClassVar[int]
15-
PROTOCOLS_FIELD_NUMBER: _ClassVar[int]
16-
SIGNEDPEERRECORD_FIELD_NUMBER: _ClassVar[int]
17-
protocol_version: str
18-
agent_version: str
19-
public_key: bytes
20-
listen_addrs: _containers.RepeatedScalarFieldContainer[bytes]
21-
observed_addr: bytes
22-
protocols: _containers.RepeatedScalarFieldContainer[str]
23-
signedPeerRecord: bytes
24-
def __init__(self, protocol_version: _Optional[str] = ..., agent_version: _Optional[str] = ..., public_key: _Optional[bytes] = ..., listen_addrs: _Optional[_Iterable[bytes]] = ..., observed_addr: _Optional[bytes] = ..., protocols: _Optional[_Iterable[str]] = ..., signedPeerRecord: _Optional[bytes] = ...) -> None: ...
13+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
14+
15+
@typing.final
16+
class Identify(google.protobuf.message.Message):
17+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
18+
19+
PROTOCOL_VERSION_FIELD_NUMBER: builtins.int
20+
AGENT_VERSION_FIELD_NUMBER: builtins.int
21+
PUBLIC_KEY_FIELD_NUMBER: builtins.int
22+
LISTEN_ADDRS_FIELD_NUMBER: builtins.int
23+
OBSERVED_ADDR_FIELD_NUMBER: builtins.int
24+
PROTOCOLS_FIELD_NUMBER: builtins.int
25+
SIGNEDPEERRECORD_FIELD_NUMBER: builtins.int
26+
protocol_version: builtins.str
27+
agent_version: builtins.str
28+
public_key: builtins.bytes
29+
observed_addr: builtins.bytes
30+
signedPeerRecord: builtins.bytes
31+
@property
32+
def listen_addrs(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]: ...
33+
@property
34+
def protocols(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
35+
def __init__(
36+
self,
37+
*,
38+
protocol_version: builtins.str | None = ...,
39+
agent_version: builtins.str | None = ...,
40+
public_key: builtins.bytes | None = ...,
41+
listen_addrs: collections.abc.Iterable[builtins.bytes] | None = ...,
42+
observed_addr: builtins.bytes | None = ...,
43+
protocols: collections.abc.Iterable[builtins.str] | None = ...,
44+
signedPeerRecord: builtins.bytes | None = ...,
45+
) -> None: ...
46+
def HasField(self, field_name: typing.Literal["agent_version", b"agent_version", "observed_addr", b"observed_addr", "protocol_version", b"protocol_version", "public_key", b"public_key", "signedPeerRecord", b"signedPeerRecord"]) -> builtins.bool: ...
47+
def ClearField(self, field_name: typing.Literal["agent_version", b"agent_version", "listen_addrs", b"listen_addrs", "observed_addr", b"observed_addr", "protocol_version", b"protocol_version", "protocols", b"protocols", "public_key", b"public_key", "signedPeerRecord", b"signedPeerRecord"]) -> None: ...
48+
49+
global___Identify = Identify

libp2p/kad_dht/pb/kademlia_pb2.py

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

libp2p/pubsub/pb/rpc_pb2.py

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

0 commit comments

Comments
 (0)