Skip to content

Regression in 2.2.0: yaml.dump can no longer save capnp messages with Data type fields #385

@OfekShilon

Description

@OfekShilon

In a nutshell: when schema files define fields with type Data, pycapnp <= 2.1.0 compiled this schema into python attributes of type bytes. pycapnp 2.2.0 compiles them to python attributes of type memoryview, which are subject to the limitation that they cannot be pickled.

So attempts to pickle - even indirectly, as yaml.dump does - fail, and existing code breaks.

A small repro is available in https://github.com/OfekShilon/capnp.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions