Samuel Colvin

Results 1016 comments of Samuel Colvin

Thanks for reporting this. The most likely explanation for this is that pydantic v2 is using more memory than v1, and when you exceed the memory available seg faults occur....

The second case is unrelated. This is done by the URL rust crate, so it probably mandated by a rfc somewhere.

Sorry, the second case is related.

I was able to reproduce this error with @rafales's example from #8392. Thanks so much @rafales, that's really helpful. @davidhewitt and I will do some further digging, specifically: * see...

I think it's very likely this is related to https://github.com/gevent/gevent/issues/1819. My dumb theory: gevent is switching thread when pydantic-core/pyo3 effectively calls `getattr` on the object, meaning code that expects to...

We need wait for the new pyo3 API/GIL pool. That's getting pretty close, check the progress in the pyo3 repo.

Thanks everyone for commenting. I'd be happy to accept a PR to allow an opt-in change of behaviour. While i know many people here think the current behaviour is a...

@tworedz, go for it. > Wouldn't it be better to enhance the `AnyUrl` type by giving it it's own implementation of `__add__` providing a feature like `urllib`'s [`urljoin`](https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urljoin) ? @JensHeinrich,...

I agree with @davidhewitt, but I would suggest adding `dumb_union` (default `False`) since: 1. Better to have `False` as the default 2. The behavior will inevitably be somewhat different to...

I would say it's "how it is", rather than clearly a bug or an intended behaviour. As per [this](https://github.com/pydantic/pydantic-core/blob/ca1055b6af1f391ee34e8663e135511f15689c91/src/serializers/fields.rs#L182) code, we do those checks before custom logic to serialize the...