add miss file ,and sync kernel to 1e2e6bbbc

This commit is contained in:
loongson
2024-06-27 09:34:17 +08:00
parent 75e64c9ee9
commit c40a6b0873
2459 changed files with 110021 additions and 7 deletions
@@ -0,0 +1,23 @@
from io import BytesIO
from avro.schema import Parse
from avro.io import DatumReader, BinaryDecoder
schema = Parse("""{
"namespace": "org.buildroot.package.python_avro",
"type": "record",
"name": "Developer",
"fields": [
{"name": "email", "type": "string"},
{"name": "maintainer_of", "type": "string"}
]
}""")
example = b'<titouan.christophe@railnova.eu\x16python_avro'
reader = DatumReader(schema)
deserialized = reader.read(BinaryDecoder(BytesIO(example)))
assert deserialized == {
'email': 'titouan.christophe@railnova.eu',
'maintainer_of': 'python_avro',
}