betterproto2-compiler 0.7.0__py3-none-any.whl → 0.8.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- betterproto2_compiler/known_types/__init__.py +14 -1
- betterproto2_compiler/known_types/any.py +24 -3
- betterproto2_compiler/known_types/duration.py +2 -2
- betterproto2_compiler/known_types/google_values.py +18 -18
- betterproto2_compiler/known_types/struct.py +111 -0
- betterproto2_compiler/known_types/timestamp.py +2 -2
- betterproto2_compiler/lib/__init__.py +12 -0
- betterproto2_compiler/lib/google/protobuf/__init__.py +902 -107
- betterproto2_compiler/lib/google/protobuf/compiler/__init__.py +22 -5
- betterproto2_compiler/lib/py.typed +0 -0
- betterproto2_compiler/plugin/models.py +81 -50
- betterproto2_compiler/plugin/parser.py +3 -1
- betterproto2_compiler/templates/service_stub_sync.py.j2 +4 -6
- betterproto2_compiler/templates/template.py.j2 +25 -8
- {betterproto2_compiler-0.7.0.dist-info → betterproto2_compiler-0.8.0.dist-info}/METADATA +2 -2
- {betterproto2_compiler-0.7.0.dist-info → betterproto2_compiler-0.8.0.dist-info}/RECORD +18 -16
- {betterproto2_compiler-0.7.0.dist-info → betterproto2_compiler-0.8.0.dist-info}/WHEEL +0 -0
- {betterproto2_compiler-0.7.0.dist-info → betterproto2_compiler-0.8.0.dist-info}/entry_points.txt +0 -0
@@ -4,9 +4,9 @@
|
|
4
4
|
# This file has been @generated
|
5
5
|
|
6
6
|
__all__ = (
|
7
|
-
"CodeGeneratorResponseFeature",
|
8
7
|
"CodeGeneratorRequest",
|
9
8
|
"CodeGeneratorResponse",
|
9
|
+
"CodeGeneratorResponseFeature",
|
10
10
|
"CodeGeneratorResponseFile",
|
11
11
|
"Version",
|
12
12
|
)
|
@@ -17,7 +17,8 @@ import betterproto2
|
|
17
17
|
|
18
18
|
from ....message_pool import default_message_pool
|
19
19
|
|
20
|
-
|
20
|
+
_COMPILER_VERSION = "0.8.0"
|
21
|
+
betterproto2.check_compiler_version(_COMPILER_VERSION)
|
21
22
|
|
22
23
|
|
23
24
|
class CodeGeneratorResponseFeature(betterproto2.Enum):
|
@@ -25,11 +26,27 @@ class CodeGeneratorResponseFeature(betterproto2.Enum):
|
|
25
26
|
Sync with code_generator.h.
|
26
27
|
"""
|
27
28
|
|
28
|
-
|
29
|
+
NONE = 0
|
30
|
+
|
31
|
+
PROTO3_OPTIONAL = 1
|
32
|
+
|
33
|
+
SUPPORTS_EDITIONS = 2
|
29
34
|
|
30
|
-
|
35
|
+
@classmethod
|
36
|
+
def betterproto_value_to_renamed_proto_names(cls) -> dict[int, str]:
|
37
|
+
return {
|
38
|
+
0: "FEATURE_NONE",
|
39
|
+
1: "FEATURE_PROTO3_OPTIONAL",
|
40
|
+
2: "FEATURE_SUPPORTS_EDITIONS",
|
41
|
+
}
|
31
42
|
|
32
|
-
|
43
|
+
@classmethod
|
44
|
+
def betterproto_renamed_proto_names_to_value(cls) -> dict[str, int]:
|
45
|
+
return {
|
46
|
+
"FEATURE_NONE": 0,
|
47
|
+
"FEATURE_PROTO3_OPTIONAL": 1,
|
48
|
+
"FEATURE_SUPPORTS_EDITIONS": 2,
|
49
|
+
}
|
33
50
|
|
34
51
|
|
35
52
|
@dataclass(eq=False, repr=False)
|
File without changes
|
@@ -34,10 +34,10 @@ from dataclasses import (
|
|
34
34
|
|
35
35
|
from betterproto2 import unwrap
|
36
36
|
|
37
|
+
from betterproto2_compiler import casing
|
37
38
|
from betterproto2_compiler.compile.importing import get_type_reference, parse_source_type_name
|
38
39
|
from betterproto2_compiler.compile.naming import (
|
39
40
|
pythonize_class_name,
|
40
|
-
pythonize_enum_member_name,
|
41
41
|
pythonize_field_name,
|
42
42
|
pythonize_method_name,
|
43
43
|
)
|
@@ -60,43 +60,43 @@ from betterproto2_compiler.settings import Settings
|
|
60
60
|
|
61
61
|
# Organize proto types into categories
|
62
62
|
PROTO_FLOAT_TYPES = (
|
63
|
-
FieldDescriptorProtoType.
|
64
|
-
FieldDescriptorProtoType.
|
63
|
+
FieldDescriptorProtoType.DOUBLE, # 1
|
64
|
+
FieldDescriptorProtoType.FLOAT, # 2
|
65
65
|
)
|
66
66
|
PROTO_INT_TYPES = (
|
67
|
-
FieldDescriptorProtoType.
|
68
|
-
FieldDescriptorProtoType.
|
69
|
-
FieldDescriptorProtoType.
|
70
|
-
FieldDescriptorProtoType.
|
71
|
-
FieldDescriptorProtoType.
|
72
|
-
FieldDescriptorProtoType.
|
73
|
-
FieldDescriptorProtoType.
|
74
|
-
FieldDescriptorProtoType.
|
75
|
-
FieldDescriptorProtoType.
|
76
|
-
FieldDescriptorProtoType.
|
67
|
+
FieldDescriptorProtoType.INT64, # 3
|
68
|
+
FieldDescriptorProtoType.UINT64, # 4
|
69
|
+
FieldDescriptorProtoType.INT32, # 5
|
70
|
+
FieldDescriptorProtoType.FIXED64, # 6
|
71
|
+
FieldDescriptorProtoType.FIXED32, # 7
|
72
|
+
FieldDescriptorProtoType.UINT32, # 13
|
73
|
+
FieldDescriptorProtoType.SFIXED32, # 15
|
74
|
+
FieldDescriptorProtoType.SFIXED64, # 16
|
75
|
+
FieldDescriptorProtoType.SINT32, # 17
|
76
|
+
FieldDescriptorProtoType.SINT64, # 18
|
77
77
|
)
|
78
|
-
PROTO_BOOL_TYPES = (FieldDescriptorProtoType.
|
79
|
-
PROTO_STR_TYPES = (FieldDescriptorProtoType.
|
80
|
-
PROTO_BYTES_TYPES = (FieldDescriptorProtoType.
|
78
|
+
PROTO_BOOL_TYPES = (FieldDescriptorProtoType.BOOL,) # 8
|
79
|
+
PROTO_STR_TYPES = (FieldDescriptorProtoType.STRING,) # 9
|
80
|
+
PROTO_BYTES_TYPES = (FieldDescriptorProtoType.BYTES,) # 12
|
81
81
|
PROTO_MESSAGE_TYPES = (
|
82
|
-
FieldDescriptorProtoType.
|
83
|
-
FieldDescriptorProtoType.
|
82
|
+
FieldDescriptorProtoType.MESSAGE, # 11
|
83
|
+
FieldDescriptorProtoType.ENUM, # 14
|
84
84
|
)
|
85
|
-
PROTO_MAP_TYPES = (FieldDescriptorProtoType.
|
85
|
+
PROTO_MAP_TYPES = (FieldDescriptorProtoType.MESSAGE,) # 11
|
86
86
|
PROTO_PACKED_TYPES = (
|
87
|
-
FieldDescriptorProtoType.
|
88
|
-
FieldDescriptorProtoType.
|
89
|
-
FieldDescriptorProtoType.
|
90
|
-
FieldDescriptorProtoType.
|
91
|
-
FieldDescriptorProtoType.
|
92
|
-
FieldDescriptorProtoType.
|
93
|
-
FieldDescriptorProtoType.
|
94
|
-
FieldDescriptorProtoType.
|
95
|
-
FieldDescriptorProtoType.
|
96
|
-
FieldDescriptorProtoType.
|
97
|
-
FieldDescriptorProtoType.
|
98
|
-
FieldDescriptorProtoType.
|
99
|
-
FieldDescriptorProtoType.
|
87
|
+
FieldDescriptorProtoType.DOUBLE, # 1
|
88
|
+
FieldDescriptorProtoType.FLOAT, # 2
|
89
|
+
FieldDescriptorProtoType.INT64, # 3
|
90
|
+
FieldDescriptorProtoType.UINT64, # 4
|
91
|
+
FieldDescriptorProtoType.INT32, # 5
|
92
|
+
FieldDescriptorProtoType.FIXED64, # 6
|
93
|
+
FieldDescriptorProtoType.FIXED32, # 7
|
94
|
+
FieldDescriptorProtoType.BOOL, # 8
|
95
|
+
FieldDescriptorProtoType.UINT32, # 13
|
96
|
+
FieldDescriptorProtoType.SFIXED32, # 15
|
97
|
+
FieldDescriptorProtoType.SFIXED64, # 16
|
98
|
+
FieldDescriptorProtoType.SINT32, # 17
|
99
|
+
FieldDescriptorProtoType.SINT64, # 18
|
100
100
|
)
|
101
101
|
|
102
102
|
|
@@ -309,7 +309,7 @@ class MessageCompiler(ProtoContentBase):
|
|
309
309
|
|
310
310
|
def is_map(proto_field_obj: FieldDescriptorProto, parent_message: DescriptorProto) -> bool:
|
311
311
|
"""True if proto_field_obj is a map, otherwise False."""
|
312
|
-
if proto_field_obj.type == FieldDescriptorProtoType.
|
312
|
+
if proto_field_obj.type == FieldDescriptorProtoType.MESSAGE:
|
313
313
|
if not hasattr(parent_message, "nested_type"):
|
314
314
|
return False
|
315
315
|
|
@@ -347,7 +347,7 @@ class FieldCompiler(ProtoContentBase):
|
|
347
347
|
field_args = ", ".join(([""] + self.betterproto_field_args) if self.betterproto_field_args else [])
|
348
348
|
|
349
349
|
betterproto_field_type = (
|
350
|
-
f"betterproto2.field({self.proto_obj.number}, betterproto2.{str(self.field_type)}{field_args})"
|
350
|
+
f"betterproto2.field({self.proto_obj.number}, betterproto2.TYPE_{str(self.field_type)}{field_args})"
|
351
351
|
)
|
352
352
|
if self.py_name in dir(builtins):
|
353
353
|
self.message.builtins_types.add(self.py_name)
|
@@ -357,7 +357,7 @@ class FieldCompiler(ProtoContentBase):
|
|
357
357
|
def betterproto_field_args(self) -> list[str]:
|
358
358
|
args = []
|
359
359
|
|
360
|
-
if self.field_type == FieldDescriptorProtoType.
|
360
|
+
if self.field_type == FieldDescriptorProtoType.MESSAGE and self.is_wrapped:
|
361
361
|
unwrap_type = self.unwrapped_py_type
|
362
362
|
|
363
363
|
# Without the lambda function, the type is evaluated right away, which fails since the corresponding
|
@@ -368,7 +368,7 @@ class FieldCompiler(ProtoContentBase):
|
|
368
368
|
args.append("optional=True")
|
369
369
|
elif self.repeated:
|
370
370
|
args.append("repeated=True")
|
371
|
-
elif self.field_type == FieldType.
|
371
|
+
elif self.field_type == FieldType.ENUM:
|
372
372
|
args.append(f"default_factory=lambda: {self.py_type}(0)")
|
373
373
|
return args
|
374
374
|
|
@@ -384,12 +384,12 @@ class FieldCompiler(ProtoContentBase):
|
|
384
384
|
|
385
385
|
@property
|
386
386
|
def repeated(self) -> bool:
|
387
|
-
return self.proto_obj.label == FieldDescriptorProtoLabel.
|
387
|
+
return self.proto_obj.label == FieldDescriptorProtoLabel.REPEATED
|
388
388
|
|
389
389
|
@property
|
390
390
|
def optional(self) -> bool:
|
391
391
|
# TODO not for maps
|
392
|
-
return self.proto_obj.proto3_optional or (self.field_type == FieldType.
|
392
|
+
return self.proto_obj.proto3_optional or (self.field_type == FieldType.MESSAGE and not self.repeated)
|
393
393
|
|
394
394
|
@property
|
395
395
|
def field_type(self) -> FieldType:
|
@@ -412,7 +412,7 @@ class FieldCompiler(ProtoContentBase):
|
|
412
412
|
|
413
413
|
@property
|
414
414
|
def is_wrapped(self) -> bool:
|
415
|
-
assert self.field_type == FieldDescriptorProtoType.
|
415
|
+
assert self.field_type == FieldDescriptorProtoType.MESSAGE
|
416
416
|
type_package, type_name = parse_source_type_name(self.proto_obj.type_name, self.output_file.parent_request)
|
417
417
|
|
418
418
|
return (type_package, type_name) in WRAPPED_TYPES
|
@@ -457,22 +457,22 @@ class FieldCompiler(ProtoContentBase):
|
|
457
457
|
|
458
458
|
annotations = []
|
459
459
|
|
460
|
-
if self.proto_obj.type in (FieldType.
|
460
|
+
if self.proto_obj.type in (FieldType.INT32, FieldType.SFIXED32, FieldType.SINT32):
|
461
461
|
annotations.append("pydantic.Field(ge=-2**31, le=2**31 - 1)")
|
462
462
|
|
463
|
-
elif self.proto_obj.type in (FieldType.
|
463
|
+
elif self.proto_obj.type in (FieldType.UINT32, FieldType.FIXED32):
|
464
464
|
annotations.append("pydantic.Field(ge=0, le=2**32 - 1)")
|
465
465
|
|
466
|
-
elif self.proto_obj.type in (FieldType.
|
466
|
+
elif self.proto_obj.type in (FieldType.INT64, FieldType.SFIXED64, FieldType.SINT64):
|
467
467
|
annotations.append("pydantic.Field(ge=-2**63, le=2**63 - 1)")
|
468
468
|
|
469
|
-
elif self.proto_obj.type in (FieldType.
|
469
|
+
elif self.proto_obj.type in (FieldType.UINT64, FieldType.FIXED64):
|
470
470
|
annotations.append("pydantic.Field(ge=0, le=2**64 - 1)")
|
471
471
|
|
472
|
-
elif self.proto_obj.type == FieldType.
|
472
|
+
elif self.proto_obj.type == FieldType.FLOAT:
|
473
473
|
annotations.append("pydantic.AfterValidator(betterproto2.validators.validate_float32)")
|
474
474
|
|
475
|
-
elif self.proto_obj.type == FieldType.
|
475
|
+
elif self.proto_obj.type == FieldType.STRING:
|
476
476
|
annotations.append("pydantic.AfterValidator(betterproto2.validators.validate_string)")
|
477
477
|
|
478
478
|
return annotations
|
@@ -544,7 +544,7 @@ class MapEntryCompiler(FieldCompiler):
|
|
544
544
|
|
545
545
|
self.py_v_type = value_field_compiler.py_type
|
546
546
|
if (
|
547
|
-
value_field_compiler.field_type == FieldDescriptorProtoType.
|
547
|
+
value_field_compiler.field_type == FieldDescriptorProtoType.MESSAGE
|
548
548
|
and value_field_compiler.is_wrapped
|
549
549
|
):
|
550
550
|
self.unwrap_v = value_field_compiler.unwrapped_py_type
|
@@ -560,8 +560,8 @@ class MapEntryCompiler(FieldCompiler):
|
|
560
560
|
|
561
561
|
def get_field_string(self) -> str:
|
562
562
|
"""Construct string representation of this field as a field."""
|
563
|
-
proto_type_1 = f"betterproto2.{self.proto_k_type}"
|
564
|
-
proto_type_2 = f"betterproto2.{self.proto_v_type}"
|
563
|
+
proto_type_1 = f"betterproto2.TYPE_{self.proto_k_type}"
|
564
|
+
proto_type_2 = f"betterproto2.TYPE_{self.proto_v_type}"
|
565
565
|
|
566
566
|
unwrap_2 = ""
|
567
567
|
if self.unwrap_v:
|
@@ -610,20 +610,47 @@ class EnumDefinitionCompiler(ProtoContentBase):
|
|
610
610
|
"""Representation of an Enum entry."""
|
611
611
|
|
612
612
|
name: str
|
613
|
+
proto_name: str
|
613
614
|
value: int
|
614
615
|
comment: str
|
615
616
|
|
616
617
|
def __post_init__(self) -> None:
|
617
|
-
# Get entries/allowed values for this Enum
|
618
618
|
self.entries = [
|
619
619
|
self.EnumEntry(
|
620
|
-
name=
|
620
|
+
name=entry_proto_value.name,
|
621
|
+
proto_name=entry_proto_value.name,
|
621
622
|
value=entry_proto_value.number,
|
622
623
|
comment=get_comment(proto_file=self.source_file, path=self.path + [2, entry_number]),
|
623
624
|
)
|
624
625
|
for entry_number, entry_proto_value in enumerate(self.proto_obj.value)
|
625
626
|
]
|
626
627
|
|
628
|
+
if not self.entries:
|
629
|
+
return
|
630
|
+
|
631
|
+
# Remove enum prefixes
|
632
|
+
enum_name: str = self.proto_obj.name
|
633
|
+
|
634
|
+
enum_name_reduced = enum_name.replace("_", "").lower()
|
635
|
+
|
636
|
+
first_entry = self.entries[0].name
|
637
|
+
|
638
|
+
# Find the potential common prefix
|
639
|
+
enum_prefix = ""
|
640
|
+
for i in range(len(first_entry)):
|
641
|
+
if first_entry[: i + 1].replace("_", "").lower() == enum_name_reduced:
|
642
|
+
enum_prefix = f"{first_entry[: i + 1]}_"
|
643
|
+
break
|
644
|
+
|
645
|
+
should_rename = enum_prefix and all(entry.name.startswith(enum_prefix) for entry in self.entries)
|
646
|
+
|
647
|
+
if should_rename:
|
648
|
+
for entry in self.entries:
|
649
|
+
entry.name = entry.name[len(enum_prefix) :]
|
650
|
+
|
651
|
+
for entry in self.entries:
|
652
|
+
entry.name = casing.sanitize_name(entry.name)
|
653
|
+
|
627
654
|
@property
|
628
655
|
def proto_name(self) -> str:
|
629
656
|
return self.proto_obj.name
|
@@ -647,6 +674,10 @@ class EnumDefinitionCompiler(ProtoContentBase):
|
|
647
674
|
"""
|
648
675
|
return self.output_file.get_descriptor_name(self.source_file)
|
649
676
|
|
677
|
+
@property
|
678
|
+
def has_renamed_entries(self) -> bool:
|
679
|
+
return any(entry.proto_name != entry.name for entry in self.entries)
|
680
|
+
|
650
681
|
|
651
682
|
@dataclass(kw_only=True)
|
652
683
|
class ServiceCompiler(ProtoContentBase):
|
@@ -89,7 +89,7 @@ def get_settings(plugin_options: list[str]) -> Settings:
|
|
89
89
|
|
90
90
|
|
91
91
|
def generate_code(request: CodeGeneratorRequest) -> CodeGeneratorResponse:
|
92
|
-
response = CodeGeneratorResponse(supported_features=CodeGeneratorResponseFeature.
|
92
|
+
response = CodeGeneratorResponse(supported_features=CodeGeneratorResponseFeature.PROTO3_OPTIONAL)
|
93
93
|
|
94
94
|
plugin_options = request.parameter.split(",") if request.parameter else []
|
95
95
|
settings = get_settings(plugin_options)
|
@@ -171,6 +171,8 @@ def generate_code(request: CodeGeneratorRequest) -> CodeGeneratorResponse:
|
|
171
171
|
)
|
172
172
|
)
|
173
173
|
|
174
|
+
response.file.append(CodeGeneratorResponseFile(name="py.typed", content=""))
|
175
|
+
|
174
176
|
if settings.google_protobuf_descriptors:
|
175
177
|
response.file.append(
|
176
178
|
CodeGeneratorResponseFile(
|
@@ -29,24 +29,22 @@
|
|
29
29
|
{% block method_body %}
|
30
30
|
{% if method.server_streaming %}
|
31
31
|
{% if method.client_streaming %}
|
32
|
-
|
32
|
+
yield from self._channel.stream_stream(
|
33
33
|
"{{ method.route }}",
|
34
34
|
{{ method.py_input_message_type }}.SerializeToString,
|
35
35
|
{{ method.py_output_message_type }}.FromString,
|
36
|
-
)(iter(messages))
|
37
|
-
yield response
|
36
|
+
)(iter(messages))
|
38
37
|
{% else %}
|
39
38
|
{% if method.is_input_msg_empty %}
|
40
39
|
if message is None:
|
41
40
|
message = {{ method.py_input_message_type }}()
|
42
41
|
|
43
42
|
{% endif %}
|
44
|
-
|
43
|
+
yield from self._channel.unary_stream(
|
45
44
|
"{{ method.route }}",
|
46
45
|
{{ method.py_input_message_type }}.SerializeToString,
|
47
46
|
{{ method.py_output_message_type }}.FromString,
|
48
|
-
)(message)
|
49
|
-
yield response
|
47
|
+
)(message)
|
50
48
|
|
51
49
|
{% endif %}
|
52
50
|
{% else %}
|
@@ -8,8 +8,9 @@ class {{ enum.py_name | add_to_all }}(betterproto2.Enum):
|
|
8
8
|
|
9
9
|
{% if output_file.settings.google_protobuf_descriptors %}
|
10
10
|
{# Add descriptor class property to be more drop-in compatible with other libraries. #}
|
11
|
-
@betterproto2.
|
12
|
-
|
11
|
+
@betterproto2.staticproperty
|
12
|
+
@staticmethod
|
13
|
+
def DESCRIPTOR() -> EnumDescriptor:
|
13
14
|
return {{ enum.descriptor_name }}.enum_types_by_name['{{ enum.prefixed_proto_name }}']
|
14
15
|
{% endif %}
|
15
16
|
|
@@ -23,12 +24,26 @@ class {{ enum.py_name | add_to_all }}(betterproto2.Enum):
|
|
23
24
|
|
24
25
|
{% endfor %}
|
25
26
|
|
26
|
-
{% if
|
27
|
+
{% if enum.has_renamed_entries %}
|
27
28
|
@classmethod
|
28
|
-
def
|
29
|
-
|
29
|
+
def betterproto_value_to_renamed_proto_names(cls) -> dict[int, str]:
|
30
|
+
return {
|
31
|
+
{% for entry in enum.entries %}
|
32
|
+
{% if entry.proto_name != entry.name %}
|
33
|
+
{{ entry.value }}: "{{ entry.proto_name }}",
|
34
|
+
{% endif %}
|
35
|
+
{% endfor %}
|
36
|
+
}
|
30
37
|
|
31
|
-
|
38
|
+
@classmethod
|
39
|
+
def betterproto_renamed_proto_names_to_value(cls) -> dict[str, int]:
|
40
|
+
return {
|
41
|
+
{% for entry in enum.entries %}
|
42
|
+
{% if entry.proto_name != entry.name %}
|
43
|
+
"{{ entry.proto_name }}": {{ entry.value }},
|
44
|
+
{% endif %}
|
45
|
+
{% endfor %}
|
46
|
+
}
|
32
47
|
{% endif %}
|
33
48
|
|
34
49
|
{% endfor %}
|
@@ -54,8 +69,9 @@ class {{ message.py_name | add_to_all }}(betterproto2.Message):
|
|
54
69
|
|
55
70
|
{% if output_file.settings.google_protobuf_descriptors %}
|
56
71
|
{# Add descriptor class property to be more drop-in compatible with other libraries. #}
|
57
|
-
@betterproto2.
|
58
|
-
|
72
|
+
@betterproto2.staticproperty
|
73
|
+
@staticmethod
|
74
|
+
def DESCRIPTOR() -> Descriptor:
|
59
75
|
return {{ message.descriptor_name }}.message_types_by_name['{{ message.prefixed_proto_name }}']
|
60
76
|
{% endif %}
|
61
77
|
|
@@ -157,6 +173,7 @@ class {{ (service.py_name + "Base") | add_to_all }}(ServiceBase):
|
|
157
173
|
async def __rpc_{{ method.py_name }}(self, stream: "grpclib.server.Stream[{{ method.py_input_message_type }}, {{ method.py_output_message_type }}]") -> None:
|
158
174
|
{% if not method.client_streaming %}
|
159
175
|
request = await stream.recv_message()
|
176
|
+
assert request is not None
|
160
177
|
{% else %}
|
161
178
|
request = stream.__aiter__()
|
162
179
|
{% endif %}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: betterproto2_compiler
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.8.0
|
4
4
|
Summary: Compiler for betterproto2
|
5
5
|
Project-URL: Documentation, https://betterproto.github.io/python-betterproto2/
|
6
6
|
Project-URL: Repository, https://github.com/betterproto/python-betterproto2
|
@@ -8,7 +8,7 @@ Author-email: Adrien Vannson <adrien.vannson@protonmail.com>, "Daniel G. Taylor"
|
|
8
8
|
License-Expression: MIT
|
9
9
|
Keywords: compiler,gRPC,protobuf
|
10
10
|
Requires-Python: <4.0,>=3.10
|
11
|
-
Requires-Dist: betterproto2[grpclib]<0.
|
11
|
+
Requires-Dist: betterproto2[grpclib]<0.9,>=0.8.0
|
12
12
|
Requires-Dist: jinja2>=3.0.3
|
13
13
|
Requires-Dist: ruff~=0.9.3
|
14
14
|
Requires-Dist: strenum<0.5,>=0.4.15; python_version == '3.10'
|
@@ -5,30 +5,32 @@ betterproto2_compiler/settings.py,sha256=Y867wBQad2EunzlsZEd0OjPaXGwzqcBmPKYMG9Q
|
|
5
5
|
betterproto2_compiler/compile/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
6
|
betterproto2_compiler/compile/importing.py,sha256=yfIJ7oEXR1Ghe5meGzOE0ORf1Sr7Xa2Pr_slOw-rT3s,7137
|
7
7
|
betterproto2_compiler/compile/naming.py,sha256=zf0VOmNojzyv33upOGelGxjZTEDE8JULEEED5_3inHg,562
|
8
|
-
betterproto2_compiler/known_types/__init__.py,sha256=
|
9
|
-
betterproto2_compiler/known_types/any.py,sha256=
|
10
|
-
betterproto2_compiler/known_types/duration.py,sha256=
|
11
|
-
betterproto2_compiler/known_types/google_values.py,sha256=
|
12
|
-
betterproto2_compiler/known_types/
|
13
|
-
betterproto2_compiler/
|
8
|
+
betterproto2_compiler/known_types/__init__.py,sha256=_rXiV7lE3oPyKsaxEZ585j0jxljGYE-5ghdiG2r6Sa0,3833
|
9
|
+
betterproto2_compiler/known_types/any.py,sha256=KMSnzec_IPalCkFnJ3ujo9t7zvs5gxo8cd84obe2VSI,2567
|
10
|
+
betterproto2_compiler/known_types/duration.py,sha256=qSQYkDUr1SSpDgR-A3AF9inS9Ta4uvJbC7qQ55KADIk,2397
|
11
|
+
betterproto2_compiler/known_types/google_values.py,sha256=F5MmKIj70dNBdnusKB9ejDal5E2D_ZTOdpMt53H6ciU,7453
|
12
|
+
betterproto2_compiler/known_types/struct.py,sha256=YQcL4PTENRwTTNbdKWk1RefH4pCHviGttk5A0t9v5i8,4054
|
13
|
+
betterproto2_compiler/known_types/timestamp.py,sha256=u7Z3ndfeqE1nxOE-f9BBjalaa68hn9s1bN4Q_NN0elM,3494
|
14
|
+
betterproto2_compiler/lib/__init__.py,sha256=9v142BnixNiDls_1XGBHm-U03b2m6NM2lbppIqazejA,267
|
14
15
|
betterproto2_compiler/lib/message_pool.py,sha256=4-cRhhiM6bmfpUJZ8qxc8LEyqHBHpLCcotjbyZxl7JM,71
|
16
|
+
betterproto2_compiler/lib/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
17
|
betterproto2_compiler/lib/google/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
|
-
betterproto2_compiler/lib/google/protobuf/__init__.py,sha256=
|
17
|
-
betterproto2_compiler/lib/google/protobuf/compiler/__init__.py,sha256=
|
18
|
+
betterproto2_compiler/lib/google/protobuf/__init__.py,sha256=8SrZ2ZQHBfQOLLCNF-o3j6wmvH10TDq7ITDLd31cKkw,128480
|
19
|
+
betterproto2_compiler/lib/google/protobuf/compiler/__init__.py,sha256=OQB0eUz-jC1czWdhivi3Z9dWzfjPRMruj2WfeVm5Srg,10084
|
18
20
|
betterproto2_compiler/plugin/__init__.py,sha256=L3pW0b4CvkM5x53x_sYt1kYiSFPO0_vaeH6EQPq9FAM,43
|
19
21
|
betterproto2_compiler/plugin/__main__.py,sha256=vBQ82334kX06ImDbFlPFgiBRiLIinwNk3z8Khs6hd74,31
|
20
22
|
betterproto2_compiler/plugin/compiler.py,sha256=9jZcNlwxWLUQlZyCLKG33P2xCoJgqaIQHIgcZM40JGY,2730
|
21
23
|
betterproto2_compiler/plugin/main.py,sha256=b1jDEdG1Iau-4cPq89uSjU0SHwC278SxqwiuFwIF8fA,1288
|
22
|
-
betterproto2_compiler/plugin/models.py,sha256=
|
24
|
+
betterproto2_compiler/plugin/models.py,sha256=x6W2hHXDeuyDzr2SUwqlvaTVSGBE-7VmJch0gbM8Zc8,25929
|
23
25
|
betterproto2_compiler/plugin/module_validation.py,sha256=JnP8dSN83eJJVDP_UPJsHzq7E7Md3lah0PnKXDbFW5Q,4808
|
24
|
-
betterproto2_compiler/plugin/parser.py,sha256=
|
26
|
+
betterproto2_compiler/plugin/parser.py,sha256=pugZXBMQ4RDF-q9hmJRf37DxLc30OohRb26vzeA89_4,11040
|
25
27
|
betterproto2_compiler/plugin/plugin.bat,sha256=lfLT1WguAXqyerLLsRL6BfHA0RqUE6QG79v-1BYVSpI,48
|
26
28
|
betterproto2_compiler/templates/header.py.j2,sha256=4C88YH5jtEzlBcUP054rk6lK5pQ1n5_TCzlH_3VrztY,1754
|
27
29
|
betterproto2_compiler/templates/service_stub.py.j2,sha256=2fhbty6uw57EyxOskGcNlZjIjGELMKWY--pvq5ZEjFw,967
|
28
30
|
betterproto2_compiler/templates/service_stub_async.py.j2,sha256=JNOAa8FPhzYS5D0zi0DPESVEwAjkdFsVQZ008Qi4JmE,2968
|
29
|
-
betterproto2_compiler/templates/service_stub_sync.py.j2,sha256=
|
30
|
-
betterproto2_compiler/templates/template.py.j2,sha256=
|
31
|
-
betterproto2_compiler-0.
|
32
|
-
betterproto2_compiler-0.
|
33
|
-
betterproto2_compiler-0.
|
34
|
-
betterproto2_compiler-0.
|
31
|
+
betterproto2_compiler/templates/service_stub_sync.py.j2,sha256=ru0Gw4u3vQ3QYpHQVCxQ7aXFGmNkNxHyW8_KijcB9Ao,2576
|
32
|
+
betterproto2_compiler/templates/template.py.j2,sha256=tPWFd1EhA5DIu7JFg5O-cdV65bUbyTkt4ga4k0zglkE,7084
|
33
|
+
betterproto2_compiler-0.8.0.dist-info/METADATA,sha256=ttFojLxk4O2OxnMQF6wjhgDoolVHzBOoNP53JhFEzr8,658
|
34
|
+
betterproto2_compiler-0.8.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
35
|
+
betterproto2_compiler-0.8.0.dist-info/entry_points.txt,sha256=MXDaz7YfiaWx8KiSzArjUPLt6eTlMRbqzE4jCjXozuI,85
|
36
|
+
betterproto2_compiler-0.8.0.dist-info/RECORD,,
|
File without changes
|
{betterproto2_compiler-0.7.0.dist-info → betterproto2_compiler-0.8.0.dist-info}/entry_points.txt
RENAMED
File without changes
|