David Montague

Results 226 comments of David Montague

My understanding is that protobuf and flatbuffer should be pretty similar to implement (I haven't looked into it deeply though). The biggest challenge seems to me to be generating the...

Closing this now that this return type annotation is used in newer versions of FastAPI. Please let me know if this addresses other issues not handled by FastAPI and I...

If a validator is setting the attribute by default, it seems to me that you'd want the value included when `exclude_unset=True` no matter what. If that's right, you can override...

On main (and in v2 when it's released) you can use a `@model_validator(mode='wrap')` and then modify the value of `__fields_set__` to reflect your input as appropriate depending on the logic...

As @IterableTrucks notes, in OpenAPI

In v2, here's an example of how to make a custom subclass of `Sequence` that does approximately the right thing (should be similar for `List`): ```python from typing import Sequence,...

The problem is that: ```python if TYPE_CHECKING: from module_a import NodeA ``` This code will never execute during runtime, so there is nothing at runtime indicating to pydantic what `NodeA`...

Solution proposal: replace the approach of one-slot-per-private-attribute with a new slot called `__pydantic_private__` that will contain a dict with all these things. It will function similarly to `__pydantic_extra__`, and I...

Closing given this is resolved in v2. If anyone runs into new issues with this in v2 please request this issue get reopened, or better yet, open a new issue...