betterproto2-compiler 0.8.0__py3-none-any.whl → 0.9.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/lib/__init__.py +1 -1
- betterproto2_compiler/lib/google/protobuf/__init__.py +5 -3
- betterproto2_compiler/lib/google/protobuf/compiler/__init__.py +1 -1
- betterproto2_compiler/templates/header.py.j2 +2 -2
- betterproto2_compiler/templates/service_stub_async.py.j2 +1 -1
- betterproto2_compiler/templates/template.py.j2 +1 -1
- {betterproto2_compiler-0.8.0.dist-info → betterproto2_compiler-0.9.0.dist-info}/METADATA +2 -2
- {betterproto2_compiler-0.8.0.dist-info → betterproto2_compiler-0.9.0.dist-info}/RECORD +10 -10
- {betterproto2_compiler-0.8.0.dist-info → betterproto2_compiler-0.9.0.dist-info}/WHEEL +0 -0
- {betterproto2_compiler-0.8.0.dist-info → betterproto2_compiler-0.9.0.dist-info}/entry_points.txt +0 -0
@@ -97,7 +97,7 @@ import dateutil.parser
|
|
97
97
|
|
98
98
|
from ...message_pool import default_message_pool
|
99
99
|
|
100
|
-
_COMPILER_VERSION = "0.
|
100
|
+
_COMPILER_VERSION = "0.9.0"
|
101
101
|
betterproto2.check_compiler_version(_COMPILER_VERSION)
|
102
102
|
|
103
103
|
|
@@ -2965,13 +2965,15 @@ default_message_pool.register_message("google.protobuf", "MethodDescriptorProto"
|
|
2965
2965
|
|
2966
2966
|
@dataclass(eq=False, repr=False)
|
2967
2967
|
class MethodOptions(betterproto2.Message):
|
2968
|
-
deprecated: "bool" = betterproto2.field(33, betterproto2.TYPE_BOOL)
|
2969
2968
|
"""
|
2970
2969
|
Note: Field numbers 1 through 32 are reserved for Google's internal RPC
|
2971
2970
|
framework. We apologize for hoarding these numbers to ourselves, but
|
2972
2971
|
we were already using them long before we decided to release Protocol
|
2973
2972
|
Buffers.
|
2973
|
+
"""
|
2974
2974
|
|
2975
|
+
deprecated: "bool" = betterproto2.field(33, betterproto2.TYPE_BOOL)
|
2976
|
+
"""
|
2975
2977
|
Is this method deprecated?
|
2976
2978
|
Depending on the target platform, this can emit Deprecated annotations
|
2977
2979
|
for the method, or it will be completely ignored; in the very least,
|
@@ -3445,7 +3447,7 @@ class Struct(betterproto2.Message):
|
|
3445
3447
|
for key, val in value.items():
|
3446
3448
|
fields[key] = Value.from_dict(val)
|
3447
3449
|
|
3448
|
-
return cls(fields=fields)
|
3450
|
+
return cls(fields=fields) # type: ignore[reportArgumentType]
|
3449
3451
|
|
3450
3452
|
def to_dict(
|
3451
3453
|
self,
|
@@ -29,7 +29,7 @@ from dataclasses import dataclass
|
|
29
29
|
{% endif %}
|
30
30
|
|
31
31
|
import betterproto2
|
32
|
-
from betterproto2
|
32
|
+
from betterproto2 import grpclib as betterproto2_grpclib
|
33
33
|
import grpc
|
34
34
|
import grpclib
|
35
35
|
from google.protobuf.descriptor import Descriptor, EnumDescriptor
|
@@ -49,7 +49,7 @@ from .google_proto_descriptor_pool import default_google_proto_descriptor_pool
|
|
49
49
|
|
50
50
|
if TYPE_CHECKING:
|
51
51
|
import grpclib.server
|
52
|
-
from betterproto2.
|
52
|
+
from betterproto2.grpclib.grpclib_client import MetadataLike
|
53
53
|
from grpclib.metadata import Deadline
|
54
54
|
|
55
55
|
_COMPILER_VERSION="{{ version }}"
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
{# Class definition #}
|
4
4
|
{% block class_name %}{{ service.py_name }}{% if output_file.settings.client_generation.is_async_prefixed %}Async{% endif %}Stub{% endblock %}
|
5
|
-
{% block inherit_from %}
|
5
|
+
{% block inherit_from %}betterproto2_grpclib.ServiceStub{% endblock %}
|
6
6
|
|
7
7
|
{# Methods definition #}
|
8
8
|
{% block method_definition %}
|
@@ -139,7 +139,7 @@ default_message_pool.register_message("{{ output_file.package }}", "{{ message.p
|
|
139
139
|
|
140
140
|
{% if output_file.settings.server_generation == "async" %}
|
141
141
|
{% for _, service in output_file.services|dictsort(by="key") %}
|
142
|
-
class {{ (service.py_name + "Base") | add_to_all }}(ServiceBase):
|
142
|
+
class {{ (service.py_name + "Base") | add_to_all }}(betterproto2_grpclib.ServiceBase):
|
143
143
|
{% if service.comment %}
|
144
144
|
"""
|
145
145
|
{{ service.comment | indent(4) }}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: betterproto2_compiler
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.9.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
|
11
|
+
Requires-Dist: betterproto2<0.10,>=0.9.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'
|
@@ -11,12 +11,12 @@ betterproto2_compiler/known_types/duration.py,sha256=qSQYkDUr1SSpDgR-A3AF9inS9Ta
|
|
11
11
|
betterproto2_compiler/known_types/google_values.py,sha256=F5MmKIj70dNBdnusKB9ejDal5E2D_ZTOdpMt53H6ciU,7453
|
12
12
|
betterproto2_compiler/known_types/struct.py,sha256=YQcL4PTENRwTTNbdKWk1RefH4pCHviGttk5A0t9v5i8,4054
|
13
13
|
betterproto2_compiler/known_types/timestamp.py,sha256=u7Z3ndfeqE1nxOE-f9BBjalaa68hn9s1bN4Q_NN0elM,3494
|
14
|
-
betterproto2_compiler/lib/__init__.py,sha256=
|
14
|
+
betterproto2_compiler/lib/__init__.py,sha256=X0C25tT4-TD9ju15HkS3IhNBQEc3PsYmHvvq6d-aq7w,267
|
15
15
|
betterproto2_compiler/lib/message_pool.py,sha256=4-cRhhiM6bmfpUJZ8qxc8LEyqHBHpLCcotjbyZxl7JM,71
|
16
16
|
betterproto2_compiler/lib/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
17
17
|
betterproto2_compiler/lib/google/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
18
|
-
betterproto2_compiler/lib/google/protobuf/__init__.py,sha256=
|
19
|
-
betterproto2_compiler/lib/google/protobuf/compiler/__init__.py,sha256=
|
18
|
+
betterproto2_compiler/lib/google/protobuf/__init__.py,sha256=nVQo_SRuWXZD7zF0K1IyFe0BTTT8Qg-SqOdLJuZs8Ks,128532
|
19
|
+
betterproto2_compiler/lib/google/protobuf/compiler/__init__.py,sha256=wXA3OT_LQ-o984DoaUZ2LOtrQDbsFaB5zvPj8U_qy2Y,10084
|
20
20
|
betterproto2_compiler/plugin/__init__.py,sha256=L3pW0b4CvkM5x53x_sYt1kYiSFPO0_vaeH6EQPq9FAM,43
|
21
21
|
betterproto2_compiler/plugin/__main__.py,sha256=vBQ82334kX06ImDbFlPFgiBRiLIinwNk3z8Khs6hd74,31
|
22
22
|
betterproto2_compiler/plugin/compiler.py,sha256=9jZcNlwxWLUQlZyCLKG33P2xCoJgqaIQHIgcZM40JGY,2730
|
@@ -25,12 +25,12 @@ betterproto2_compiler/plugin/models.py,sha256=x6W2hHXDeuyDzr2SUwqlvaTVSGBE-7VmJc
|
|
25
25
|
betterproto2_compiler/plugin/module_validation.py,sha256=JnP8dSN83eJJVDP_UPJsHzq7E7Md3lah0PnKXDbFW5Q,4808
|
26
26
|
betterproto2_compiler/plugin/parser.py,sha256=pugZXBMQ4RDF-q9hmJRf37DxLc30OohRb26vzeA89_4,11040
|
27
27
|
betterproto2_compiler/plugin/plugin.bat,sha256=lfLT1WguAXqyerLLsRL6BfHA0RqUE6QG79v-1BYVSpI,48
|
28
|
-
betterproto2_compiler/templates/header.py.j2,sha256=
|
28
|
+
betterproto2_compiler/templates/header.py.j2,sha256=Lj565xa2bR71aU7wS9DtgcXQe2K2np9vt300NyLqIKU,1757
|
29
29
|
betterproto2_compiler/templates/service_stub.py.j2,sha256=2fhbty6uw57EyxOskGcNlZjIjGELMKWY--pvq5ZEjFw,967
|
30
|
-
betterproto2_compiler/templates/service_stub_async.py.j2,sha256=
|
30
|
+
betterproto2_compiler/templates/service_stub_async.py.j2,sha256=glWGaJsHSL9dyLINk7rJ72u6_RAJsEJnfFUByNr3ghw,2976
|
31
31
|
betterproto2_compiler/templates/service_stub_sync.py.j2,sha256=ru0Gw4u3vQ3QYpHQVCxQ7aXFGmNkNxHyW8_KijcB9Ao,2576
|
32
|
-
betterproto2_compiler/templates/template.py.j2,sha256=
|
33
|
-
betterproto2_compiler-0.
|
34
|
-
betterproto2_compiler-0.
|
35
|
-
betterproto2_compiler-0.
|
36
|
-
betterproto2_compiler-0.
|
32
|
+
betterproto2_compiler/templates/template.py.j2,sha256=E5MhuaHcRoccyPcjIkvpuX6CCzyRnTO_jpyH6Ne7ctE,7105
|
33
|
+
betterproto2_compiler-0.9.0.dist-info/METADATA,sha256=oPIg8fK51B2tqQzeUUKY1XD5DaqgFfoY49D5TO01mGU,650
|
34
|
+
betterproto2_compiler-0.9.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
35
|
+
betterproto2_compiler-0.9.0.dist-info/entry_points.txt,sha256=MXDaz7YfiaWx8KiSzArjUPLt6eTlMRbqzE4jCjXozuI,85
|
36
|
+
betterproto2_compiler-0.9.0.dist-info/RECORD,,
|
File without changes
|
{betterproto2_compiler-0.8.0.dist-info → betterproto2_compiler-0.9.0.dist-info}/entry_points.txt
RENAMED
File without changes
|