You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(py): Fix array/list value serialization (#1827)
The rust-side serialization definition for custom constants is a bit
more complex than what we had written on the python side for array and
list values.
This fixes#1826, and was tested by running the issue's example from
guppy.
- > Why aren't we testing this locally?
Constant value deserialization is a "best effort" thing.
If we can match the serialized thing with one of the hardcoded
implementors of `CustomConst` (registered in a global var by `typetag`)
then we deserialize into the specific class.
If we cannot deserialize into any specific class, we use
`CustomSerialized` by default.
So even if we build a constant from python and `validate` using the rust
checker, the deserialization will succeed and validate correctly.
It'd be nice to fail the deserialization if a constant claims to be of
some specific kind but cannot be deserialized into it. I'll open an
issue and look a bit into it.
0 commit comments