Fixes the maxlen property being dropped on deque validation. Happened only if the deque item has been typed. Changes the _validate_sequence_like func, #6581 by @maciekglowka
Importing create_model in tools.py through relative path instead of absolute path - so that it doesn't import V2 code when copied over to V2 branch, #6361 by @SharathHuddar
Fix a bug in Literal usage with typing-extension==4.6.0, #5826 by @hramezani
This solves the (closed) issue #3849 where aliased fields that use discriminated union fail to validate when the data contains the non-aliased field name, #5736 by @benwah
Update email-validator dependency to >=2.0.0post2, #5627 by @adriangb
Implement logic to support creating validators from non standard callables by using defaults to identify them and unwrapping functools.partial and functools.partialmethod when checking the signature, #5126 by @JensHeinrich
Fix mypy plugin for v1.1.1, and fix dataclass_transform decorator for pydantic dataclasses, #5111 by @cdce8p
Raise ValidationError, not ConfigError, when a discriminator value is unhashable, #4773 by @kurtmckee
This PR contains the following updates:
| Package | Update | Change |
|---|---|---|
| [pydantic](https://github.com/pydantic/pydantic) ([changelog](https://docs.pydantic.dev/latest/changelog/)) | patch | `==1.10.2` -> `==1.10.14` |
---
### Release Notes
<details>
<summary>pydantic/pydantic (pydantic)</summary>
### [`v1.10.14`](https://github.com/pydantic/pydantic/blob/HEAD/HISTORY.md#v11014-2024-01-19)
[Compare Source](https://github.com/pydantic/pydantic/compare/v1.10.13...v1.10.14)
- Update install.md by [@​dmontagu](https://github.com/dmontagu) in [#​7690](https://github.com/pydantic/pydantic/issues/7690)
- Fix ci to only deploy docs on release by [@​sydney-runkle](https://github.com/sydney-runkle) in [#​7740](https://github.com/pydantic/pydantic/issues/7740)
- Ubuntu fixes for V1 by [@​sydney-runkle](https://github.com/sydney-runkle) in [#​8540](https://github.com/pydantic/pydantic/issues/8540) and [#​8587](https://github.com/pydantic/pydantic/issues/8587)
- Fix cached_property handling in dataclasses when copied by [@​rdbisme](https://github.com/rdbisme) in [#​8407](https://github.com/pydantic/pydantic/issues/8407)
### [`v1.10.13`](https://github.com/pydantic/pydantic/blob/HEAD/HISTORY.md#v11013-2023-09-27)
[Compare Source](https://github.com/pydantic/pydantic/compare/v1.10.12...v1.10.13)
- Fix: Add max length check to `pydantic.validate_email`, [#​7673](https://github.com/pydantic/pydantic/issues/7673) by [@​hramezani](https://github.com/hramezani)
- Docs: Fix pip commands to install v1, [#​6930](https://github.com/pydantic/pydantic/issues/6930) by [@​chbndrhnns](https://github.com/chbndrhnns)
### [`v1.10.12`](https://github.com/pydantic/pydantic/blob/HEAD/HISTORY.md#v11012-2023-07-24)
[Compare Source](https://github.com/pydantic/pydantic/compare/v1.10.11...v1.10.12)
- Fixes the `maxlen` property being dropped on `deque` validation. Happened only if the deque item has been typed. Changes the `_validate_sequence_like` func, [#​6581](https://github.com/pydantic/pydantic/pull/6581) by [@​maciekglowka](https://github.com/maciekglowka)
### [`v1.10.11`](https://github.com/pydantic/pydantic/blob/HEAD/HISTORY.md#v11011-2023-07-04)
[Compare Source](https://github.com/pydantic/pydantic/compare/v1.10.10...v1.10.11)
- Importing create_model in tools.py through relative path instead of absolute path - so that it doesn't import V2 code when copied over to V2 branch, [#​6361](https://github.com/pydantic/pydantic/pull/6361) by [@​SharathHuddar](https://github.com/SharathHuddar)
### [`v1.10.10`](https://github.com/pydantic/pydantic/blob/HEAD/HISTORY.md#v11010-2023-06-30)
[Compare Source](https://github.com/pydantic/pydantic/compare/v1.10.9...v1.10.10)
- Add Pydantic `Json` field support to settings management, [#​6250](https://github.com/pydantic/pydantic/pull/6250) by [@​hramezani](https://github.com/hramezani)
- Fixed literal validator errors for unhashable values, [#​6188](https://github.com/pydantic/pydantic/pull/6188) by [@​markus1978](https://github.com/markus1978)
- Fixed bug with generics receiving forward refs, [#​6130](https://github.com/pydantic/pydantic/pull/6130) by [@​mark-todd](https://github.com/mark-todd)
- Update install method of FastAPI for internal tests in CI, [#​6117](https://github.com/pydantic/pydantic/pull/6117) by [@​Kludex](https://github.com/Kludex)
### [`v1.10.9`](https://github.com/pydantic/pydantic/blob/HEAD/HISTORY.md#v1109-2023-06-07)
[Compare Source](https://github.com/pydantic/pydantic/compare/v1.10.8...v1.10.9)
- Fix trailing zeros not ignored in Decimal validation, [#​5968](https://github.com/pydantic/pydantic/pull/5968) by [@​hramezani](https://github.com/hramezani)
- Fix mypy plugin for v1.4.0, [#​5928](https://github.com/pydantic/pydantic/pull/5928) by [@​cdce8p](https://github.com/cdce8p)
- Add future and past date hypothesis strategies, [#​5850](https://github.com/pydantic/pydantic/pull/5850) by [@​bschoenmaeckers](https://github.com/bschoenmaeckers)
- Discourage usage of Cython 3 with Pydantic 1.x, [#​5845](https://github.com/pydantic/pydantic/pull/5845) by [@​lig](https://github.com/lig)
### [`v1.10.8`](https://github.com/pydantic/pydantic/blob/HEAD/HISTORY.md#v1108-2023-05-23)
[Compare Source](https://github.com/pydantic/pydantic/compare/v1.10.7...v1.10.8)
- Fix a bug in `Literal` usage with `typing-extension==4.6.0`, [#​5826](https://github.com/pydantic/pydantic/pull/5826) by [@​hramezani](https://github.com/hramezani)
- This solves the (closed) issue [#​3849](https://github.com/pydantic/pydantic/pull/3849) where aliased fields that use discriminated union fail to validate when the data contains the non-aliased field name, [#​5736](https://github.com/pydantic/pydantic/pull/5736) by [@​benwah](https://github.com/benwah)
- Update email-validator dependency to >=2.0.0post2, [#​5627](https://github.com/pydantic/pydantic/pull/5627) by [@​adriangb](https://github.com/adriangb)
- update `AnyClassMethod` for changes in [python/typeshed#9771](https://github.com/python/typeshed/issues/9771), [#​5505](https://github.com/pydantic/pydantic/pull/5505) by [@​ITProKyle](https://github.com/ITProKyle)
### [`v1.10.7`](https://github.com/pydantic/pydantic/blob/HEAD/HISTORY.md#v1107-2023-03-22)
[Compare Source](https://github.com/pydantic/pydantic/compare/v1.10.6...v1.10.7)
- Fix creating schema from model using `ConstrainedStr` with `regex` as dict key, [#​5223](https://github.com/pydantic/pydantic/pull/5223) by [@​matejetz](https://github.com/matejetz)
- Address bug in mypy plugin caused by explicit_package_bases=True, [#​5191](https://github.com/pydantic/pydantic/pull/5191) by [@​dmontagu](https://github.com/dmontagu)
- Add implicit defaults in the mypy plugin for Field with no default argument, [#​5190](https://github.com/pydantic/pydantic/pull/5190) by [@​dmontagu](https://github.com/dmontagu)
- Fix schema generated for Enum values used as Literals in discriminated unions, [#​5188](https://github.com/pydantic/pydantic/pull/5188) by [@​javibookline](https://github.com/javibookline)
- Fix mypy failures caused by the pydantic mypy plugin when users define `from_orm` in their own classes, [#​5187](https://github.com/pydantic/pydantic/pull/5187) by [@​dmontagu](https://github.com/dmontagu)
- Fix `InitVar` usage with pydantic dataclasses, mypy version `1.1.1` and the custom mypy plugin, [#​5162](https://github.com/pydantic/pydantic/pull/5162) by [@​cdce8p](https://github.com/cdce8p)
### [`v1.10.6`](https://github.com/pydantic/pydantic/blob/HEAD/HISTORY.md#v1106-2023-03-08)
[Compare Source](https://github.com/pydantic/pydantic/compare/v1.10.5...v1.10.6)
- Implement logic to support creating validators from non standard callables by using defaults to identify them and unwrapping `functools.partial` and `functools.partialmethod` when checking the signature, [#​5126](https://github.com/pydantic/pydantic/pull/5126) by [@​JensHeinrich](https://github.com/JensHeinrich)
- Fix mypy plugin for v1.1.1, and fix `dataclass_transform` decorator for pydantic dataclasses, [#​5111](https://github.com/pydantic/pydantic/pull/5111) by [@​cdce8p](https://github.com/cdce8p)
- Raise `ValidationError`, not `ConfigError`, when a discriminator value is unhashable, [#​4773](https://github.com/pydantic/pydantic/pull/4773) by [@​kurtmckee](https://github.com/kurtmckee)
### [`v1.10.5`](https://github.com/pydantic/pydantic/blob/HEAD/HISTORY.md#v1105-2023-02-15)
[Compare Source](https://github.com/pydantic/pydantic/compare/v1.10.4...v1.10.5)
- Fix broken parametrized bases handling with `GenericModel`s with complex sets of models, [#​5052](https://github.com/pydantic/pydantic/pull/5052) by [@​MarkusSintonen](https://github.com/MarkusSintonen)
- Invalidate mypy cache if plugin config changes, [#​5007](https://github.com/pydantic/pydantic/pull/5007) by [@​cdce8p](https://github.com/cdce8p)
- Fix `RecursionError` when deep-copying dataclass types wrapped by pydantic, [#​4949](https://github.com/pydantic/pydantic/pull/4949) by [@​mbillingr](https://github.com/mbillingr)
- Fix `X | Y` union syntax breaking `GenericModel`, [#​4146](https://github.com/pydantic/pydantic/pull/4146) by [@​thenx](https://github.com/thenx)
- Switch coverage badge to show coverage for this branch/release, [#​5060](https://github.com/pydantic/pydantic/pull/5060) by [@​samuelcolvin](https://github.com/samuelcolvin)
### [`v1.10.4`](https://github.com/pydantic/pydantic/blob/HEAD/HISTORY.md#v1104-2022-12-30)
[Compare Source](https://github.com/pydantic/pydantic/compare/v1.10.3...v1.10.4)
- Change dependency to `typing-extensions>=4.2.0`, [#​4885](https://github.com/pydantic/pydantic/pull/4885) by [@​samuelcolvin](https://github.com/samuelcolvin)
### [`v1.10.3`](https://github.com/pydantic/pydantic/blob/HEAD/HISTORY.md#v1103-2022-12-29)
[Compare Source](https://github.com/pydantic/pydantic/compare/v1.10.2...v1.10.3)
**NOTE: v1.10.3 was ["yanked"](https://pypi.org/help/#yanked) from PyPI due to [#​4885](https://github.com/pydantic/pydantic/pull/4885) which is fixed in v1.10.4**
- fix parsing of custom root models, [#​4883](https://github.com/pydantic/pydantic/pull/4883) by [@​gou177](https://github.com/gou177)
- fix: use dataclass proxy for frozen or empty dataclasses, [#​4878](https://github.com/pydantic/pydantic/pull/4878) by [@​PrettyWood](https://github.com/PrettyWood)
- Fix `schema` and `schema_json` on models where a model instance is a one of default values, [#​4781](https://github.com/pydantic/pydantic/pull/4781) by [@​Bobronium](https://github.com/Bobronium)
- Add Jina AI to sponsors on docs index page, [#​4767](https://github.com/pydantic/pydantic/pull/4767) by [@​samuelcolvin](https://github.com/samuelcolvin)
- fix: support assignment on `DataclassProxy`, [#​4695](https://github.com/pydantic/pydantic/pull/4695) by [@​PrettyWood](https://github.com/PrettyWood)
- Add `postgresql+psycopg` as allowed scheme for `PostgreDsn` to make it usable with SQLAlchemy 2, [#​4689](https://github.com/pydantic/pydantic/pull/4689) by [@​morian](https://github.com/morian)
- Allow dict schemas to have both `patternProperties` and `additionalProperties`, [#​4641](https://github.com/pydantic/pydantic/pull/4641) by [@​jparise](https://github.com/jparise)
- Fixes error passing None for optional lists with `unique_items`, [#​4568](https://github.com/pydantic/pydantic/pull/4568) by [@​mfulgo](https://github.com/mfulgo)
- Fix `GenericModel` with `Callable` param raising a `TypeError`, [#​4551](https://github.com/pydantic/pydantic/pull/4551) by [@​mfulgo](https://github.com/mfulgo)
- Fix field regex with `StrictStr` type annotation, [#​4538](https://github.com/pydantic/pydantic/pull/4538) by [@​sisp](https://github.com/sisp)
- Correct `dataclass_transform` keyword argument name from `field_descriptors` to `field_specifiers`, [#​4500](https://github.com/pydantic/pydantic/pull/4500) by [@​samuelcolvin](https://github.com/samuelcolvin)
- fix: avoid multiple calls of `__post_init__` when dataclasses are inherited, [#​4487](https://github.com/pydantic/pydantic/pull/4487) by [@​PrettyWood](https://github.com/PrettyWood)
- Reduce the size of binary wheels, [#​2276](https://github.com/pydantic/pydantic/pull/2276) by [@​samuelcolvin](https://github.com/samuelcolvin)
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xODIuMyIsInVwZGF0ZWRJblZlciI6IjM3LjE4Mi4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR contains the following updates:
==1.10.2->==1.10.14Release Notes
pydantic/pydantic (pydantic)
v1.10.14Compare Source
v1.10.13Compare Source
pydantic.validate_email, #7673 by @hramezaniv1.10.12Compare Source
maxlenproperty being dropped ondequevalidation. Happened only if the deque item has been typed. Changes the_validate_sequence_likefunc, #6581 by @maciekglowkav1.10.11Compare Source
v1.10.10Compare Source
Jsonfield support to settings management, #6250 by @hramezaniv1.10.9Compare Source
v1.10.8Compare Source
Literalusage withtyping-extension==4.6.0, #5826 by @hramezaniAnyClassMethodfor changes in python/typeshed#9771, #5505 by @ITProKylev1.10.7Compare Source
ConstrainedStrwithregexas dict key, #5223 by @matejetzfrom_ormin their own classes, #5187 by @dmontaguInitVarusage with pydantic dataclasses, mypy version1.1.1and the custom mypy plugin, #5162 by @cdce8pv1.10.6Compare Source
functools.partialandfunctools.partialmethodwhen checking the signature, #5126 by @JensHeinrichdataclass_transformdecorator for pydantic dataclasses, #5111 by @cdce8pValidationError, notConfigError, when a discriminator value is unhashable, #4773 by @kurtmckeev1.10.5Compare Source
GenericModels with complex sets of models, #5052 by @MarkusSintonenRecursionErrorwhen deep-copying dataclass types wrapped by pydantic, #4949 by @mbillingrX | Yunion syntax breakingGenericModel, #4146 by @thenxv1.10.4Compare Source
typing-extensions>=4.2.0, #4885 by @samuelcolvinv1.10.3Compare Source
NOTE: v1.10.3 was "yanked" from PyPI due to #4885 which is fixed in v1.10.4
schemaandschema_jsonon models where a model instance is a one of default values, #4781 by @BobroniumDataclassProxy, #4695 by @PrettyWoodpostgresql+psycopgas allowed scheme forPostgreDsnto make it usable with SQLAlchemy 2, #4689 by @morianpatternPropertiesandadditionalProperties, #4641 by @jpariseunique_items, #4568 by @mfulgoGenericModelwithCallableparam raising aTypeError, #4551 by @mfulgoStrictStrtype annotation, #4538 by @sispdataclass_transformkeyword argument name fromfield_descriptorstofield_specifiers, #4500 by @samuelcolvin__post_init__when dataclasses are inherited, #4487 by @PrettyWoodConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.