Skip to content

Support types.MappingProxyType #632

@intentionally-left-nil

Description

@intentionally-left-nil

Description

For creating immutable types, msgspec already supports serializing/parsing: frozenset, tuple, dataclass(frozen=True).

The only primary data type missing here is a dict. The immutable variant of a dict is MappingProxyType.

Thanks to the extensibility, it's possible today to create a custom encode/decoder for this type. However, it would be great to include this as a supported, builtin type

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions