Results 60 comments of George Sakkis

> Between a single library that did serialisation, validation and conversion poorly, and three libraries that each excelled at one of those things, I think I'd prefer the latter. So...

+1 for (optional, off by default) validation on `__init__`. If this gets implemented, a natural next step would be to support [assignment validation](https://docs.pydantic.dev/latest/usage/model_config/#validate-assignment), something like: ```py class Example(msgspec.Struct, validate_init=True, validate_assignment=True):...

@jcrist thanks, I came up with a (simplified) version of your `dec_hook` to support `type[X]` annotations but it would be nice if there was builtin support. > Or are you...

See [this example](https://beanie-odm.dev/tutorial/multi-model-pattern/) from Beanie: ```py class Parent(UnionDoc): # Union class Settings: name = "union_doc_collection" # Collection name class_id = "_class_id" # _class_id is default beanie internal field used to...

Just ran into this, any update or workaround? EDIT: Not a general fix but at least for EmailStr this workaround seems to work for me: ```python from pydantic import AfterValidator,...

I was thinking of refactoring some of my pydantic BaseModels to dataclasses but based on this discussion I'll hold on for now/ever. The crux of the matter seems to be...

I don't care much about how schemas are named, afaict they're not even displayed at the default Redocly UI. The important part is what's listed under "request body schema" and...

There are two ways to fix this: 1. Make comparisons between quantities of different registries return False. 2. Make hashing independent of the registry. The first is more in line...

I'm also trying to find with a solution that combines runtime dimensionality validation with static type safety. Sadly none of the solutions shared here or at https://github.com/hgrecco/pint/issues/1166 typechecks statically (at...