You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a base dataclass created with eq=True, values of that class used as fields in a BaseModel inheritor lose their equatable property when wrapped by Pydantic. This seems to contradict the docs, which state "the generated pydantic dataclass will have the exact same configuration (order, frozen, ...) as the original one."
The second assertion above fails as written. When replacing dataclasses.dataclass with pydantic.dataclasses.dataclass it succeeds, which is our workaround for now, but it seems like this shouldn't be necessary.
The text was updated successfully, but these errors were encountered:
Checks
Bug
Output of
python -c "import pydantic.utils; print(pydantic.utils.version_info())"
:When using a base dataclass created with
eq=True
, values of that class used as fields in aBaseModel
inheritor lose their equatable property when wrapped by Pydantic. This seems to contradict the docs, which state "the generated pydantic dataclass will have the exact same configuration (order, frozen, ...) as the original one."The second assertion above fails as written. When replacing
dataclasses.dataclass
withpydantic.dataclasses.dataclass
it succeeds, which is our workaround for now, but it seems like this shouldn't be necessary.The text was updated successfully, but these errors were encountered: