From Jiri Vlasak to ~martijnbraam/public-inbox
--- bare/dump.py | 4 ++-- example/cursor.bare | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bare/dump.py b/bare/dump.py index 4739397..b5f9bb9 100644 --- a/bare/dump.py @@ -9,7 +9,7 @@ from itertools import zip_longest as zipl from bare import _unpack_primitive from bare.__main__ import codegen from bare.bare_ast import BareType, UnionType, BarePrimitive, TypeKind, StructType, MapType, NamedType, ArrayType, \[message trimmed]
From Jiri Vlasak to ~martijnbraam/public-inbox
--- README.md | 58 ++++++------- example/address.bin | Bin 55 -> 52 bytes example/addressmaybe-address.bin | Bin 56 -> 53 bytes example/customer.bin | Bin 148 -> 145 bytes example/employee.bin | Bin 164 -> 161 bytes example/example-read.py | 5 +- example/example.py | 11 +-- example/person-customer.bin | Bin 149 -> 146 bytes example/person-employee.bin | Bin 165 -> 162 bytes example/schema.bare | 46 +++++----- example/schema.py | 142 ++++++++++++++++--------------- 11 files changed, 131 insertions(+), 131 deletions(-) [message trimmed]
From Jiri Vlasak to ~martijnbraam/public-inbox
--- bare/test_encoded_messages.py | 98 +++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 bare/test_encoded_messages.py diff --git a/bare/test_encoded_messages.py b/bare/test_encoded_messages.py new file mode 100644 index 0000000..b0bfd74 --- /dev/null @@ -0,0 +1,98 @@ """Test Example Company from BARE RFC Appendix B.""" SCHEMA = """\[message trimmed]
From Jiri Vlasak to ~martijnbraam/public-inbox
--- bare/__init__.py | 4 ++++ bare/__main__.py | 27 ++++++++++++++++++--------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/bare/__init__.py b/bare/__init__.py index 4bfec34..c9d8110 100644 --- a/bare/__init__.py @@ -169,6 +169,8 @@ def _pack_type(ast_node, data, module): else: return _pack_type(referenced._ast, data, module) elif isinstance(ast_node, ListType): if hasattr(data, 'value'):[message trimmed]
From Jiri Vlasak to ~martijnbraam/public-inbox
--- bare/__init__.py | 14 +-- bare/bare_ast.py | 38 ++++--- bare/parser.py | 238 +++++++++++++++++++++++----------------- bare/test_aggregates.py | 14 +-- bare/test_parser.py | 162 +++++++++++++++++++-------- bare/test_primitives.py | 2 +- 6 files changed, 291 insertions(+), 177 deletions(-) diff --git a/bare/__init__.py b/bare/__init__.py index 02cb298..4bfec34 100644 --- a/bare/__init__.py @@ -2,7 +2,7 @@ import struct [message trimmed]
From Jiri Vlasak to ~martijnbraam/public-inbox
--- bare/lex.py | 86 ++++++++++++++------------ bare/test_lexer.py | 148 ++++++++++++++++++++++++--------------------- 2 files changed, 129 insertions(+), 105 deletions(-) diff --git a/bare/lex.py b/bare/lex.py index e97338b..98deaeb 100644 --- a/bare/lex.py @@ -7,10 +7,7 @@ class LexError(Exception): class Token(Enum): TTYPE = auto()[message trimmed]
From Jiri Vlasak to ~martijnbraam/public-inbox
--- bare/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bare/__main__.py b/bare/__main__.py index 90bf59b..73b18db 100644 --- a/bare/__main__.py @@ -45,7 +45,7 @@ def _gen_type(type): result = '\t_ast = {}\n\n'.format(type.code()) result += '\t@classmethod\n' result += '\tdef pack(cls, member):\n' result += '\t\treturn bare.pack(cls, member)\n\n' result += '\t\treturn bare.pack(member, cls)\n\n'[message trimmed]
From Jiri Vlasak to ~martijnbraam/public-inbox
The schema in the latest BARE RFC [1] has changed. This set of patches updates the bare-py to the newest schema version. Please, let me know if you want the changes ordered or grouped differently. [1]: https://datatracker.ietf.org/doc/draft-devault-bare/ Jiri Vlasak (7): Fix union pack, see 322e8d64 Update lex to current schema Update parser to current schema Make optional, list, and map nameable Add example company test
From Jiri Vlasak to ~martijnbraam/public-inbox
18. 12. 2024 23:41:29 builds.sr.ht <builds@sr.ht>: > bare-py/patches/.build.yml: FAILED in 1m13s > > [Improve tests][0] v2 from [Jiri Vlasak][1] > > [0]: https://lists.sr.ht/~martijnbraam/public-inbox/patches/56528 > [1]: jiri.hubacek@gmail.com > > ✗ #1392462 FAILED bare-py/patches/.build.yml > https://builds.sr.ht/~martijnbraam/job/1392462 It looks there were some difficulties with srht bulds when the patchset was submitted. Re-triggering the build succeeded:
From Jiri Vlasak to ~martijnbraam/public-inbox
--- bare/test_primitives.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bare/test_primitives.py b/bare/test_primitives.py index b5f477e..badec6f 100644 --- a/bare/test_primitives.py @@ -8,7 +8,7 @@ from bare import _pack_primitive, _unpack_primitive, BarePrimitive, TypeKind class Test(TestCase): @given(integers(min_value=0, max_value=255)) @given(integers(min_value=0, max_value=2**8 - 1))[message trimmed]