Installing and running pydantic-xml on a new environment raises this error:
.../lib/python3.10/site-packages/pydantic_xml/serializers/factories/heterogeneous.py:14: in ElementSerializer
def from_core_schema(cls, schema: pcs.TuplePositionalSchema, ctx: Serializer.Context) -> 'ElementSerializer':
.../lib/python3.10/site-packages/pydantic_core/core_schema.py:3974: in __getattr__
raise AttributeError(f"module 'pydantic_core' has no attribute '{attr_name}'")
E AttributeError: module 'pydantic_core' has no attribute 'TuplePositionalSchema'. Did you mean: 'tuple_positional_schema'?
Installing and running
pydantic-xml
on a new environment raises this error:They seem to have removed that class in this commit: https://github.com/pydantic/pydantic-core/commit/4df7624c12b57dc47fe1de72acb2795c1631dbb9
It works with
pydantic_core < 2.16
andpedantic < 2.6
.