#13822·pydantic

Decide about fate of custom generic classes docs example

Author: ViicosCreated Sep 16, 2026Updated Sep 16, 2026
Labelsdocumentationtopic-types support

Noticed from https://github.com/pydantic/pydantic/pull/13821 that the example in https://pydantic.dev/docs/validation/latest/concepts/types/#handling-custom-generic-classes does not raise if the values of the sub-types are invalid. Seems like the example was invalid for a long time. I'm tempted to remove this atrocious example altogether, because who wants to deal with complex core schemas and runtime type expression manipulation.. xref the https://github.com/pydantic/pydantic/labels/topic-types%20support issues talking about providing a cleaner API.