Victorien

Results 142 issues of Victorien

https://github.com/pydantic/pydantic/pull/11388 was a first step in cleaning how model fields are collected. For backwards compatibility, we still allow accessing the `model(_computed)_fields` property, even though the `FieldInfo` instances may be incomplete....

change

### Initial Checks - [x] I confirm that I'm using Pydantic V2 ### Description The following generates an invalid JSON Schema: ```python from typing import Annotated from pydantic import BeforeValidator,...

topic-json schema
bug V2
topic-annotations

```python from typing import Annotated from pydantic import AfterValidator, BaseModel, WrapValidator def after_validator(v): assert False def wrap_validator(v, h): return 1 class Model1(BaseModel): a: Annotated[int, AfterValidator(after_validator), WrapValidator(wrap_validator)] Model1(a=2) # Model1(a=1) class...

bug V2
topic-annotations

### Initial Checks - [X] I have searched Google & GitHub for similar requests and couldn't find anything - [X] I have read and followed [the docs](https://docs.pydantic.dev) and still think...

feature request

This is a refactor in preparation of https://github.com/pydantic/logfire/issues/961. I'm introducing a Logfire client, so that we can use it in the various `LogfireCredentials` methods without passing the base URL and...

### Description As per our EU region checklist, a follow up feature was to implement a version check when using the CLI (at least for `logfire auth`, might apply to...

Feature Request
P3

The changes in https://github.com/pydantic/logfire/commit/2073a0c60dd6145c87c1c25d41a79bc7765bdc64 introduced new logic to infer regions (and indirectly the base API URL) from the tokens. There is now some messy and repeated logic with some levels...

# Bug The `validate_type` function: https://github.com/art049/odmantic/blob/46572816169fc48e821a8971077b58176897b93e/odmantic/model.py#L177-L203 is not "reconstructing" generic aliases correctly. In particular this part: https://github.com/art049/odmantic/blob/46572816169fc48e821a8971077b58176897b93e/odmantic/model.py#L196-L202 is assuming every generic alias is an instance of `types.GenericAlias`/`typing._GenericAlias` (it depends on...

bug

This will be really useful especially as beanie makes heavy use of Pydantic, **including internal stuff!** and will help us catching regression in our third party tests. Requires https://github.com/roman-right/lazy_model/pull/7.

As per https://github.com/python/cpython/pull/105511.