Jim Crist-Harif

Results 482 comments of Jim Crist-Harif

In the future, large issue dumps like this that are rapidly updated are hard to follow as a maintainer. If you expect a concise and understanding response from me, please...

Yeah, we're already using that for pyright support (see https://github.com/jcrist/msgspec/blob/e25177e7ecb5f6593dbc38ddfdccdbc13e13daa8/msgspec/__init__.pyi#L4-L28). We'll still likely want a mypy plugin, since it doesn't look like mypy will support this any time soon.

Thanks for opening this, it highlights an important distinction between the libraries. `msgspec.Struct` constructors _do no runtime type validation_ (unlike those of `pydantic.BaseModel`). The argument for this is that type...

Hmmm, ok. A few questions: - Is supporting only the builtin constraints that are part of jsonschema (or similar) sufficient? Can we avoid supporting arbitrary python callables and still have...

> Why do you want to avoid supporting arbitrary python callables? Nothing against it in particular. However, the current way the internal type tree is represented makes supporting these tricky....

Yeah, it'd mess with the internals in a way that's doable but would require more thought. I don't think implementing any of the builtin constraints will require much of a...

That *might* make sense? `msgspec` is mostly a nice way of working with JSON/msgpack, it's not really a format itself. The [benchmarks](https://jcristharif.com/msgspec/benchmarks.html) already compare against the most performant version of...

Thanks for opening this. This is definitely in scope, but isn't something I plan on spending much time on immediately. Note that to avoid polluting the `Struct` method namespace, this...

I'm not an active `json-schema` user - a couple questions/comments: - We can fairly easily support generating a simple `json-schema` spec from a `msgspec` annotated type. I expect this to...

> As to how to express that metadata in Python, I would recommend PEP593 (see https://github.com/jcrist/msgspec/issues/154). In your mind, how would the non-functional annotations (title, description) be specified on the...