diff --git a/dbt_common/dataclass_schema.py b/dbt_common/dataclass_schema.py index 0aad4d5..1c5b515 100644 --- a/dbt_common/dataclass_schema.py +++ b/dbt_common/dataclass_schema.py @@ -15,11 +15,15 @@ from mashumaro.jsonschema import build_json_schema # following includes DataClassDictMixin -from mashumaro.mixins.msgpack import DataClassMessagePackMixin +from mashumaro.mixins.msgpack import DataClassMessagePackMixin, MessagePackDialect import functools +class FixedMessagePackDialect(MessagePackDialect): + no_copy_collections = () + + class ValidationError(jsonschema.ValidationError): pass @@ -49,6 +53,7 @@ class dbtMashConfig(MashBaseConfig): } serialize_by_alias = True lazy_compilation = True + dialect = FixedMessagePackDialect # This class pulls in DataClassDictMixin from Mashumaro. The 'to_dict'