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
While Pydantic dataclasses have a __dataclass_fields__ attribute, their users may have validation logic, default_factory configuration, and other settings that msgspec does not enforce.
Rather than appearing to support these types but silently ignoring validation steps and defaults, it makes more sense to treat them as explicitly unsupported.
The text was updated successfully, but these errors were encountered:
I'm writing a framework that unfortunately has to handle a few libraries that use Pydantic. I think having a basic msgspec <> Pydantic model translation would help me leverage the outputs of those libraries without having to create a second source of truth within my code. Even if PR #729 gets accepted, a semi-blessed match-case statement here with msgspec inspect's type would go a long way in ensuring some type of compatibility.
Description
While Pydantic dataclasses have a
__dataclass_fields__
attribute, their users may have validation logic,default_factory
configuration, and other settings that msgspec does not enforce.Rather than appearing to support these types but silently ignoring validation steps and defaults, it makes more sense to treat them as explicitly unsupported.
The text was updated successfully, but these errors were encountered: