Closed as not planned
Description
Summary
protobuf.Struct
appears to not load correctly with from_dict(...)
, which also affects from_json(...)
Reproduction Steps
I originally saw this with a more complex message, however I've minified it down to a single API call.
Using betterproto==2.0.0b6
:
>>> import betterproto.lib.google.protobuf as protobuf
>>> protobuf.Struct().from_dict({"a": "b"})
Expected Results
I expect a Struct
instance populated from the dictionary:
Struct(a="b")
Actual Results
I receive an empty Struct
instance:
Struct()
System Information
libprotoc 25.1
Python 3.12.0
Name: betterproto
Version: 2.0.0b6
Summary: A better Protobuf / gRPC generator & library
Home-page: https://github.com/danielgtaylor/python-betterproto
Author: Daniel G. Taylor
Author-email: danielgtaylor@gmail.com
License: MIT
Location: /Users/william/devel/attestation/python/env/lib/python3.12/site-packages
Requires: grpclib, python-dateutil
Required-by: in-toto-attestation
Checklist
- I have searched the issues for duplicates.
- I have shown the entire traceback, if possible.
- I have verified this issue occurs on the latest prelease of betterproto which can be installed using
pip install -U --pre betterproto
, if possible.