nanopb 0.4.9.dev1472__tar.gz → 0.4.9.dev1474__tar.gz
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.
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/PKG-INFO +1 -1
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/nanopb/generator/nanopb_generator.py +6 -2
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/nanopb/generator/proto/__pycache__/__init__.cpython-38.pyc +0 -0
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/nanopb/generator/proto/__pycache__/_utils.cpython-38.pyc +0 -0
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/nanopb/generator/proto/nanopb.proto +5 -0
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/nanopb/generator/proto/nanopb_pb2.py +10 -10
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/pyproject.toml +1 -1
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/README.md +0 -0
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/nanopb/__init__.py +0 -0
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/nanopb/generator/__init__.py +0 -0
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/nanopb/generator/nanopb_generator +0 -0
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/nanopb/generator/nanopb_generator.bat +0 -0
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/nanopb/generator/nanopb_generator.py2 +0 -0
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/nanopb/generator/platformio_generator.py +0 -0
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/nanopb/generator/proto/Makefile +0 -0
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/nanopb/generator/proto/__init__.py +0 -0
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/nanopb/generator/proto/_utils.py +0 -0
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/nanopb/generator/proto/google/protobuf/descriptor.proto +0 -0
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/nanopb/generator/protoc +0 -0
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/nanopb/generator/protoc-gen-nanopb +0 -0
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/nanopb/generator/protoc-gen-nanopb-py2 +0 -0
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/nanopb/generator/protoc-gen-nanopb.bat +0 -0
- {nanopb-0.4.9.dev1472 → nanopb-0.4.9.dev1474}/nanopb/generator/protoc.bat +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: nanopb
|
|
3
|
-
Version: 0.4.9.
|
|
3
|
+
Version: 0.4.9.dev1474
|
|
4
4
|
Summary: Nanopb is a small code-size Protocol Buffers implementation in ansi C. It is especially suitable for use in microcontrollers, but fits any memory restricted system.
|
|
5
5
|
Home-page: https://jpa.kapsi.fi/nanopb/
|
|
6
6
|
License: Zlib
|
|
@@ -615,6 +615,9 @@ class Field(ProtoElement):
|
|
|
615
615
|
self.default = desc.default_value
|
|
616
616
|
|
|
617
617
|
# Check field rules, i.e. required/optional/repeated.
|
|
618
|
+
if field_options.HasField("label_override"):
|
|
619
|
+
desc.label = field_options.label_override
|
|
620
|
+
|
|
618
621
|
can_be_static = True
|
|
619
622
|
if desc.label == FieldD.LABEL_REPEATED:
|
|
620
623
|
self.rules = 'REPEATED'
|
|
@@ -625,6 +628,9 @@ class Field(ProtoElement):
|
|
|
625
628
|
if field_options.fixed_count:
|
|
626
629
|
self.rules = 'FIXARRAY'
|
|
627
630
|
|
|
631
|
+
elif desc.label == FieldD.LABEL_REQUIRED:
|
|
632
|
+
# We allow LABEL_REQUIRED using label_override even for proto3 (see #962)
|
|
633
|
+
self.rules = 'REQUIRED'
|
|
628
634
|
elif field_options.proto3:
|
|
629
635
|
if desc.type == FieldD.TYPE_MESSAGE and not field_options.proto3_singular_msgs:
|
|
630
636
|
# In most other protobuf libraries proto3 submessages have
|
|
@@ -636,8 +642,6 @@ class Field(ProtoElement):
|
|
|
636
642
|
else:
|
|
637
643
|
# Proto3 singular fields (without has_field)
|
|
638
644
|
self.rules = 'SINGULAR'
|
|
639
|
-
elif desc.label == FieldD.LABEL_REQUIRED:
|
|
640
|
-
self.rules = 'REQUIRED'
|
|
641
645
|
elif desc.label == FieldD.LABEL_OPTIONAL:
|
|
642
646
|
self.rules = 'OPTIONAL'
|
|
643
647
|
else:
|
|
Binary file
|
|
Binary file
|
|
@@ -143,6 +143,11 @@ message NanoPBOptions {
|
|
|
143
143
|
// Override type of the field in generated C code. Only to be used with related field types
|
|
144
144
|
optional google.protobuf.FieldDescriptorProto.Type type_override = 27;
|
|
145
145
|
|
|
146
|
+
// Override of the label of the field (see FieldDescriptorProto.Label). Can be used to create
|
|
147
|
+
// fields which nanopb considers required in proto3, or whether nanopb treats the field as
|
|
148
|
+
// optional/required/repeated.
|
|
149
|
+
optional google.protobuf.FieldDescriptorProto.Label label_override = 31;
|
|
150
|
+
|
|
146
151
|
// Due to historical reasons, nanopb orders fields in structs by their tag number
|
|
147
152
|
// instead of the order in .proto. Set this to false to keep the .proto order.
|
|
148
153
|
// The default value will probably change to false in nanopb-0.5.0.
|
|
@@ -15,7 +15,7 @@ _sym_db = _symbol_database.Default()
|
|
|
15
15
|
from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cnanopb.proto\x1a google/protobuf/descriptor.proto\"\
|
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cnanopb.proto\x1a google/protobuf/descriptor.proto\"\xfe\x07\n\rNanoPBOptions\x12\x10\n\x08max_size\x18\x01 \x01(\x05\x12\x12\n\nmax_length\x18\x0e \x01(\x05\x12\x11\n\tmax_count\x18\x02 \x01(\x05\x12&\n\x08int_size\x18\x07 \x01(\x0e\x32\x08.IntSize:\nIS_DEFAULT\x12$\n\x04type\x18\x03 \x01(\x0e\x32\n.FieldType:\nFT_DEFAULT\x12\x18\n\nlong_names\x18\x04 \x01(\x08:\x04true\x12\x1c\n\rpacked_struct\x18\x05 \x01(\x08:\x05\x66\x61lse\x12\x1a\n\x0bpacked_enum\x18\n \x01(\x08:\x05\x66\x61lse\x12\x1b\n\x0cskip_message\x18\x06 \x01(\x08:\x05\x66\x61lse\x12\x18\n\tno_unions\x18\x08 \x01(\x08:\x05\x66\x61lse\x12\r\n\x05msgid\x18\t \x01(\r\x12\x1e\n\x0f\x61nonymous_oneof\x18\x0b \x01(\x08:\x05\x66\x61lse\x12\x15\n\x06proto3\x18\x0c \x01(\x08:\x05\x66\x61lse\x12#\n\x14proto3_singular_msgs\x18\x15 \x01(\x08:\x05\x66\x61lse\x12\x1d\n\x0e\x65num_to_string\x18\r \x01(\x08:\x05\x66\x61lse\x12\x1b\n\x0c\x66ixed_length\x18\x0f \x01(\x08:\x05\x66\x61lse\x12\x1a\n\x0b\x66ixed_count\x18\x10 \x01(\x08:\x05\x66\x61lse\x12\x1e\n\x0fsubmsg_callback\x18\x16 \x01(\x08:\x05\x66\x61lse\x12/\n\x0cmangle_names\x18\x11 \x01(\x0e\x32\x11.TypenameMangling:\x06M_NONE\x12(\n\x11\x63\x61llback_datatype\x18\x12 \x01(\t:\rpb_callback_t\x12\x34\n\x11\x63\x61llback_function\x18\x13 \x01(\t:\x19pb_default_field_callback\x12\x30\n\x0e\x64\x65scriptorsize\x18\x14 \x01(\x0e\x32\x0f.DescriptorSize:\x07\x44S_AUTO\x12\x1a\n\x0b\x64\x65\x66\x61ult_has\x18\x17 \x01(\x08:\x05\x66\x61lse\x12\x0f\n\x07include\x18\x18 \x03(\t\x12\x0f\n\x07\x65xclude\x18\x1a \x03(\t\x12\x0f\n\x07package\x18\x19 \x01(\t\x12\x41\n\rtype_override\x18\x1b \x01(\x0e\x32*.google.protobuf.FieldDescriptorProto.Type\x12\x43\n\x0elabel_override\x18\x1f \x01(\x0e\x32+.google.protobuf.FieldDescriptorProto.Label\x12\x19\n\x0bsort_by_tag\x18\x1c \x01(\x08:\x04true\x12.\n\rfallback_type\x18\x1d \x01(\x0e\x32\n.FieldType:\x0b\x46T_CALLBACK\x12\x13\n\x0binitializer\x18\x1e \x01(\t*i\n\tFieldType\x12\x0e\n\nFT_DEFAULT\x10\x00\x12\x0f\n\x0b\x46T_CALLBACK\x10\x01\x12\x0e\n\nFT_POINTER\x10\x04\x12\r\n\tFT_STATIC\x10\x02\x12\r\n\tFT_IGNORE\x10\x03\x12\r\n\tFT_INLINE\x10\x05*D\n\x07IntSize\x12\x0e\n\nIS_DEFAULT\x10\x00\x12\x08\n\x04IS_8\x10\x08\x12\t\n\x05IS_16\x10\x10\x12\t\n\x05IS_32\x10 \x12\t\n\x05IS_64\x10@*Z\n\x10TypenameMangling\x12\n\n\x06M_NONE\x10\x00\x12\x13\n\x0fM_STRIP_PACKAGE\x10\x01\x12\r\n\tM_FLATTEN\x10\x02\x12\x16\n\x12M_PACKAGE_INITIALS\x10\x03*E\n\x0e\x44\x65scriptorSize\x12\x0b\n\x07\x44S_AUTO\x10\x00\x12\x08\n\x04\x44S_1\x10\x01\x12\x08\n\x04\x44S_2\x10\x02\x12\x08\n\x04\x44S_4\x10\x04\x12\x08\n\x04\x44S_8\x10\x08:E\n\x0enanopb_fileopt\x12\x1c.google.protobuf.FileOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptions:G\n\rnanopb_msgopt\x12\x1f.google.protobuf.MessageOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptions:E\n\x0enanopb_enumopt\x12\x1c.google.protobuf.EnumOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptions:>\n\x06nanopb\x12\x1d.google.protobuf.FieldOptions\x18\xf2\x07 \x01(\x0b\x32\x0e.NanoPBOptionsB\x1a\n\x18\x66i.kapsi.koti.jpa.nanopb')
|
|
19
19
|
|
|
20
20
|
_globals = globals()
|
|
21
21
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -23,14 +23,14 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'nanopb_pb2', _globals)
|
|
|
23
23
|
if not _descriptor._USE_C_DESCRIPTORS:
|
|
24
24
|
_globals['DESCRIPTOR']._loaded_options = None
|
|
25
25
|
_globals['DESCRIPTOR']._serialized_options = b'\n\030fi.kapsi.koti.jpa.nanopb'
|
|
26
|
-
_globals['_FIELDTYPE']._serialized_start=
|
|
27
|
-
_globals['_FIELDTYPE']._serialized_end=
|
|
28
|
-
_globals['_INTSIZE']._serialized_start=
|
|
29
|
-
_globals['_INTSIZE']._serialized_end=
|
|
30
|
-
_globals['_TYPENAMEMANGLING']._serialized_start=
|
|
31
|
-
_globals['_TYPENAMEMANGLING']._serialized_end=
|
|
32
|
-
_globals['_DESCRIPTORSIZE']._serialized_start=
|
|
33
|
-
_globals['_DESCRIPTORSIZE']._serialized_end=
|
|
26
|
+
_globals['_FIELDTYPE']._serialized_start=1075
|
|
27
|
+
_globals['_FIELDTYPE']._serialized_end=1180
|
|
28
|
+
_globals['_INTSIZE']._serialized_start=1182
|
|
29
|
+
_globals['_INTSIZE']._serialized_end=1250
|
|
30
|
+
_globals['_TYPENAMEMANGLING']._serialized_start=1252
|
|
31
|
+
_globals['_TYPENAMEMANGLING']._serialized_end=1342
|
|
32
|
+
_globals['_DESCRIPTORSIZE']._serialized_start=1344
|
|
33
|
+
_globals['_DESCRIPTORSIZE']._serialized_end=1413
|
|
34
34
|
_globals['_NANOPBOPTIONS']._serialized_start=51
|
|
35
|
-
_globals['_NANOPBOPTIONS']._serialized_end=
|
|
35
|
+
_globals['_NANOPBOPTIONS']._serialized_end=1073
|
|
36
36
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "nanopb"
|
|
3
|
-
version = "0.4.9-
|
|
3
|
+
version = "0.4.9-dev1474"
|
|
4
4
|
description = "Nanopb is a small code-size Protocol Buffers implementation in ansi C. It is especially suitable for use in microcontrollers, but fits any memory restricted system."
|
|
5
5
|
authors = ["Petteri Aimonen <jpa@npb.mail.kapsi.fi>"]
|
|
6
6
|
license = "Zlib"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|