Dmitry Pershin

Results 48 comments of Dmitry Pershin

@gizmo84 Hi, I am not sure if I understood your problem correctly, but if I did I think your model should be like this: ```python class Description(BaseXmlModel, tag="Description", nsmap={"xsi": "http://www.w3.org/2001/XMLSchema-instance"}):...

@lclbm Hi, Due to `pydantic` internal implementation of annotations handling (`pydantic` [substitutes](https://github.com/pydantic/pydantic/blob/v2.11.5/pydantic/fields.py#L457) `XmlEntityInfo` by its own implementation - `FieldInfo`), the only way to work with multiple annotations right now is...

That's weird... According to my experience `XmlEntityInfo.merge_field_infos` called four times, once for each field.

Thanks. I will try to research it, but right now I can't see any other way to achieve that except explicitly defining the field default value.

@synapticarbors Hi, you can declare `Row` as a `RootXmlModel` and define `__iter__` and `__eq__` methods: ```python from typing import Iterator import pydantic_xml as pxml xml = ''' 1.0 0.0 0.0...

@jwfraustro Hi, Thanks for your feedback! **Problem 1** If an element namespace is not defined explicitly, it receives it from the model. If an inherited model redefine its namespace, all...

@nilsbtr Hi, right now only attribute-based discriminated unions are supported.

@dromer Hi, The library is supposed to support `lxml` and std `xml.etree` backend as well. Unfortunately `xml.etree` doesn't support docinfo so I can't see any universal way to implement that...

@hellozyemlya Hi No, there is no such functionality in pydantic-xml.

@hellozyemlya Hi, Thanks for your feedback! You should use [PrivateAttr](https://docs.pydantic.dev/2.11/concepts/models/#private-model-attributes) instead of `Field`: ```python class MyModel(BaseModel): a: int b: str class XmlModel(BaseXmlModel): _b: MyModel = PrivateAttr() a: str = attr()...