You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The highlights of the v2.13 release are available in the blog post.
Several minor changes (considered non-breaking changes according to our versioning policy)
are also included in this release. Make sure to look into them before upgrading.
This release contains the updated pydantic.v1 namespace, matching version 1.10.26 which includes support for Python 3.14.
What's Changed
See the beta releases for all changes sinces 2.12.
New Features
Allow default factories of private attributes to take validated model data by @Viicos in #13013
Warn when frozen defined twice for dataclasses by @mochi22 in #10082
Do not compute JSON Schema default when plain serializers are used with when_used set to 'json-unless-none' and the default value is None by @Viicos in #10121
Refactor the whole pydanticdataclass decorator to really act like its standard lib equivalent.
It hence keeps __eq__, __hash__, ... and makes comparison with its non-validated version possible.
It also fixes usage of frozen dataclasses in fields and usage of default_factory in nested dataclasses.
The support of Config.extra has been added.
Finally, config customization directly via a dict is now possible, #2557 by @PrettyWood
BREAKING CHANGES:
The compiled boolean (whether pydantic is compiled with cython) has been moved from main.py to version.py
Now that Config.extra is supported, dataclass ignores by default extra arguments (like BaseModel)
Fix PEP487 __set_name__ protocol in BaseModel for PrivateAttrs, #4407 by @tlambert03
Allow for custom parsing of environment variables via parse_env_var in Config, #4406 by @acmiyaguchi
Discriminated union models now use oneOf instead of anyOf when generating OpenAPI schema definitions, #4335 by @MaxwellPayne
Allow type checkers to infer inner type of Json type. Json[list[str]] will be now inferred as list[str], Json[Any] should be used instead of plain Json.
Runtime behaviour is not changed, #4332 by @Bobronium
Allow empty string aliases by using a alias is not None check, rather than bool(alias), #4253 by @sergeytsaplin
The use of __dataclass_transform__ has been replaced by typing_extensions.dataclass_transform, which is the preferred way to mark pydantic models as a dataclass under PEP 681, #4241 by @multimeric
Use parent model's Config when validating nested NamedTuple fields, #4219 by @synek
Update BaseModel.construct to work with aliased Fields, #4192 by @kylebamos
Catch certain raised errors in smart_deepcopy and revert to deepcopy if so, #4184 by @coneybeare
Add Config.anystr_upper and to_upper kwarg to constr and conbytes, #4165 by @satheler
Fix JSON schema for set and frozenset when they include default values, #4155 by @aminalaee
Teach the mypy plugin that methods decorated by @validator are classmethods, #4102 by @DMRobertson
Improve mypy plugin's ability to detect required fields, #4086 by @richardxia
Document and test structural pattern matching (PEP 636) on BaseModel, #3920 by @irgolic
Fix incorrect deserialization of python timedelta object to ISO 8601 for negative time deltas.
Minus was serialized in incorrect place ("P-1DT23H59M59.888735S" instead of correct "-P1DT23H59M59.888735S"), #3899 by @07pepa
Fix validation of discriminated union fields with an alias when passing a model instance, #3846 by @chornsby
Add a CockroachDsn type to validate CockroachDB connection strings. The type
supports the following schemes: cockroachdb, cockroachdb+psycopg2 and cockroachdb+asyncpg, #3839 by @blubber
Fix MyPy plugin to not override pre-existing __init__ method in models, #3824 by @patrick91
Adds the SecretField abstract class so that all the current and future secret fields like SecretStr and SecretBytes will derive from it, #3409 by @expobrain
Support multi hosts validation in PostgresDsn, #3337 by @rglsk
Revert Breaking Change: v1.9.1 introduced a breaking change where model fields were
deep copied by default, this release reverts the default behaviour to match v1.9.0 and before,
while also allow deep-copy behaviour via copy_on_model_validation = 'deep'. See #4092 for more information.
Allow for shallow copies of model fields, Config.copy_on_model_validation is now a str which must be 'none', 'deep', or 'shallow' corresponding to not copying, deep copy & shallow copy; default 'shallow', #4093 by @timkpaine
If you want to rebase/retry this PR, check this box
mend-for-github-comBot
changed the title
fix(deps): update dependency pydantic to v1.10.13
[NEUTRAL] Update dependency pydantic to v1.10.13
Oct 20, 2025
mend-for-github-comBot
changed the title
[NEUTRAL] Update dependency pydantic to v1.10.13
chore(deps): update dependency pydantic to v1.10.13
Nov 17, 2025
mend-for-github-comBot
changed the title
chore(deps): update dependency pydantic to v1.10.13
[NEUTRAL] Update dependency pydantic to v1.10.13
Nov 27, 2025
mend-for-github-comBot
changed the title
[NEUTRAL] Update dependency pydantic to v1.10.13
chore(deps): update dependency pydantic to v1.10.13
Dec 15, 2025
mend-for-github-comBot
changed the title
chore(deps): update dependency pydantic to v1.10.13
[NEUTRAL] Update dependency pydantic to v1.10.13
Dec 29, 2025
mend-for-github-comBot
changed the title
[NEUTRAL] Update dependency pydantic to v1.10.13
chore(deps): update dependency pydantic to v1.10.13
Dec 30, 2025
mend-for-github-comBot
changed the title
chore(deps): update dependency pydantic to v1.10.13
[NEUTRAL] Update dependency pydantic to v1.10.13
Jan 13, 2026
mend-for-github-comBot
changed the title
[NEUTRAL] Update dependency pydantic to v1.10.13
chore(deps): update dependency pydantic to v1.10.13
Jan 26, 2026
mend-for-github-comBot
changed the title
chore(deps): update dependency pydantic to v1.10.13
[NEUTRAL] Update dependency pydantic to v1.10.13
Feb 4, 2026
mend-for-github-comBot
changed the title
[NEUTRAL] Update dependency pydantic to v1.10.13
chore(deps): update dependency pydantic to v1.10.13
Feb 6, 2026
mend-for-github-comBot
changed the title
chore(deps): update dependency pydantic to v1.10.13
[NEUTRAL] Update dependency pydantic to v1.10.13
Feb 7, 2026
mend-for-github-comBot
changed the title
[NEUTRAL] Update dependency pydantic to v1.10.13
chore(deps): update dependency pydantic to v1.10.13
Feb 11, 2026
mend-for-github-comBot
changed the title
chore(deps): update dependency pydantic to v1.10.13
[NEUTRAL] Update dependency pydantic to v1.10.13
Feb 12, 2026
mend-for-github-comBot
changed the title
[NEUTRAL] Update dependency pydantic to v1.10.13
chore(deps): update dependency pydantic to v1.10.13
Feb 13, 2026
mend-for-github-comBot
changed the title
chore(deps): update dependency pydantic to v1.10.13
[NEUTRAL] Update dependency pydantic to v1.10.13
Feb 14, 2026
mend-for-github-comBot
changed the title
[NEUTRAL] Update dependency pydantic to v1.10.13
chore(deps): update dependency pydantic to v1.10.13
Feb 14, 2026
mend-for-github-comBot
changed the title
chore(deps): update dependency pydantic to v1.10.13
[NEUTRAL] Update dependency pydantic to v1.10.13
Feb 22, 2026
mend-for-github-comBot
changed the title
[NEUTRAL] Update dependency pydantic to v1.10.13
chore(deps): update dependency pydantic to v1.10.13
Feb 23, 2026
mend-for-github-comBot
changed the title
chore(deps): update dependency pydantic to v1.10.13
[NEUTRAL] Update dependency pydantic to v1.10.13
Feb 26, 2026
mend-for-github-comBot
changed the title
[NEUTRAL] Update dependency pydantic to v1.10.13
chore(deps): update dependency pydantic to v1.10.13
Feb 28, 2026
mend-for-github-comBot
changed the title
chore(deps): update dependency pydantic to v1.10.13
[NEUTRAL] Update dependency pydantic to v1.10.13
Mar 1, 2026
mend-for-github-comBot
changed the title
[NEUTRAL] Update dependency pydantic to v1.10.13
chore(deps): update dependency pydantic to v1.10.13
Mar 3, 2026
mend-for-github-comBot
changed the title
chore(deps): update dependency pydantic to v1.10.13
[NEUTRAL] Update dependency pydantic to v1.10.13
Mar 6, 2026
mend-for-github-comBot
changed the title
[NEUTRAL] Update dependency pydantic to v1.10.13
chore(deps): update dependency pydantic to v1.10.13
Mar 7, 2026
mend-for-github-comBot
changed the title
chore(deps): update dependency pydantic to v1.10.13
[NEUTRAL] Update dependency pydantic to v1.10.13
Mar 11, 2026
mend-for-github-comBot
changed the title
[NEUTRAL] Update dependency pydantic to v1.10.13
chore(deps): update dependency pydantic to v1.10.13
Mar 12, 2026
mend-for-github-comBot
changed the title
chore(deps): update dependency pydantic to v1.10.13
[NEUTRAL] Update dependency pydantic to v1.10.13
Mar 13, 2026
mend-for-github-comBot
changed the title
[NEUTRAL] Update dependency pydantic to v1.10.13
chore(deps): update dependency pydantic to v1.10.13
Mar 14, 2026
mend-for-github-comBot
changed the title
chore(deps): update dependency pydantic to v1.10.13
[NEUTRAL] Update dependency pydantic to v1.10.13
Mar 16, 2026
mend-for-github-comBot
changed the title
[NEUTRAL] Update dependency pydantic to v1.10.13
chore(deps): update dependency pydantic to v1.10.13
Mar 19, 2026
mend-for-github-comBot
changed the title
chore(deps): update dependency pydantic to v1.10.13
[NEUTRAL] Update dependency pydantic to v1.10.13
Mar 21, 2026
mend-for-github-comBot
changed the title
[NEUTRAL] Update dependency pydantic to v1.10.13
chore(deps): update dependency pydantic to v1.10.13
Mar 22, 2026
mend-for-github-comBot
changed the title
chore(deps): update dependency pydantic to v1.10.13
[NEUTRAL] Update dependency pydantic to v1.10.13
Mar 24, 2026
mend-for-github-comBot
changed the title
[NEUTRAL] Update dependency pydantic to v1.10.13
chore(deps): update dependency pydantic to v1.10.13
Mar 25, 2026
mend-for-github-comBot
changed the title
chore(deps): update dependency pydantic to v1.10.13
[NEUTRAL] Update dependency pydantic to v1.10.13
Mar 26, 2026
mend-for-github-comBot
changed the title
[NEUTRAL] Update dependency pydantic to v1.10.13
chore(deps): update dependency pydantic to v1.10.13
Mar 29, 2026
mend-for-github-comBot
changed the title
chore(deps): update dependency pydantic to v1.10.13
[NEUTRAL] Update dependency pydantic to v1.10.13
Mar 30, 2026
mend-for-github-comBot
changed the title
[NEUTRAL] Update dependency pydantic to v1.10.13
chore(deps): update dependency pydantic to v1.10.13
Mar 31, 2026
mend-for-github-comBot
changed the title
chore(deps): update dependency pydantic to v1.10.13
[NEUTRAL] Update dependency pydantic to v1.10.13
Apr 15, 2026
mend-for-github-comBot
changed the title
[NEUTRAL] Update dependency pydantic to v1.10.13
chore(deps): update dependency pydantic to v1.10.13
Apr 16, 2026
mend-for-github-comBot
changed the title
chore(deps): update dependency pydantic to v1.10.13
[NEUTRAL] Update dependency pydantic to v1.10.13
Apr 20, 2026
mend-for-github-comBot
changed the title
[NEUTRAL] Update dependency pydantic to v1.10.13
chore(deps): update dependency pydantic to v1.10.13
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.9.1→1.10.13By merging this PR, the issue #79 will be automatically resolved and closed:
Release Notes
pydantic/pydantic (pydantic)
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 @PrettyWoodv1.10.2Compare Source
GitHub release
The highlights of the v2.13 release are available in the blog post.
Several minor changes (considered non-breaking changes according to our versioning policy)
are also included in this release. Make sure to look into them before upgrading.
This release contains the updated
pydantic.v1namespace, matching version 1.10.26 which includes support for Python 3.14.What's Changed
See the beta releases for all changes sinces 2.12.
New Features
Changes
Fixes
Anywhen synthesizing_build_sourcesforBaseSettings.__init__()signature in the mypy plugin by @Viicos in #13049extraconfiguration by @Viicos in #13062Packaging
New Contributors
v1.10.1Compare Source
GitHub release
The code released in v2.9.0 is practically identical to that of v2.9.0b2.
What's Changed
New Features
ZoneInfoby @Youssefares in #9896Config.val_json_bytesby @josh-newman in #9770complexnumber by @changhc in #9654annotated_types.Notby @aditkumar72 in #10210WithJsonSchemato inject$refs w/httporhttpslinks by @dAIsySHEng1 in #9863PathLiketypes by @nix010 in #9764strorcallablediscriminators to select the correct serializer by @sydney-runkle in in pydantic/pydantic-core#1397Changes
dicttypejson_schema_extraby @sydney-runkle in #9792patternfor incompatible types by @sydney-runkle in #10158'allOf'JSON schema workarounds by @dpeachey in #10029typed_dict_clsdata fromCoreMetadataby @sydney-runkle in #10180Examplesclass by @Viicos in #10181initial_metadatafrom internal metadata construct by @sydney-runkle in #10194re.Pattern.searchinstead ofre.Pattern.matchfor consistency withrustbehavior by @tinez in pydantic/pydantic-core#1368pydantic-coreserialization warning by @BoxyUwU in pydantic/pydantic-core#1377pydantic-core, changemetadatatype hint in core schemas fromAny->Dict[str, Any] | Noneby @sydney-runkle in pydantic/pydantic-core#1411selfisn't returned from model validator by @sydney-runkle in #10255Performance
BaseModelby @sydney-runkle in #10013Minor Internal Improvements
multiple_of_validator()by 31% inpydantic/_internal/_validators.pyby @misrasaurabh1 in #9839ModelPrivateAttr.__set_name__()by 18% inpydantic/fields.pyby @misrasaurabh1 in #9841dataclass()by 7% inpydantic/dataclasses.pyby @misrasaurabh1 in #9843_field_name_for_signatureby 37% inpydantic/_internal/_signature.pyby @misrasaurabh1 in #9951GenerateSchema._unpack_refs_defsby 26% inpydantic/_internal/_generate_schema.pyby @misrasaurabh1 in #9949apply_each_item_validatorsby 100% inpydantic/_internal/_generate_schema.pyby @misrasaurabh1 in #9950ConfigWrapper.core_configby 28% inpydantic/_internal/_config.pyby @misrasaurabh1 in #9953Fixes
use_enum_valuesonLiteraltypes by @kwint in #9787BaseModel/RootModelinheritance by @dmontagu in #9913strtype annotation withAnyin validator factories in documentation on validators by @maximilianfellhuber in #9885ComputedFieldInfo.wrapped_propertypointer when a property setter is assigned by @tlambert03 in #9892main.IncEnxby @tlambert03 in #9924type[Annotated[...]]by @Viicos in #9932mypyplugin: handle frozen fields on a per-field basis by @dmontagu in #9935invalid-annotated-typeerror code by @sydney-runkle in #9948uuid,url, andiptypes by @sydney-runkle in #9975dateschemas to_generate_schema.pyby @sydney-runkle in #9976decimal.Decimalvalidation to_generate_schema.pyby @sydney-runkle in #9977_std_types_schema.pyby @sydney-runkle in #9959GenerateSchema.match_typeoptions by @sydney-runkle in #9961dataclassignoringdefault_factorypassed in Annotated by @kc0506 in #9971Sequenceignoringdiscriminatorby @kc0506 in #9980IPvAnyAddressandIPvAnyInterfaceby @haoyun in #9990mypyplugin forfrom_ormcheck requiring from_attributes=True config by @radekwlsk in #9938strict=Trueto__init__inmypyplugin by @kc0506 in #9998dequeannotations by @sydney-runkle in #10018__pydantic_extra__annotation in specific circumstances by @Viicos in #10070frozenenforcement fordataclassesby @sydney-runkle in #10066__get_pydantic_core_schema__signature by @Viicos in #10075is_annotatedconsistently by @Viicos in #10095PydanticDeprecatedSince26typo by @kc0506 in #10101pyrighttests, refactor model decorators signatures by @Viicos in #10092ipserialization logic by @sydney-runkle in #10112dataclassesby @mochi22 in #10082when_usedset to'json-unless-none'and the default value isNoneby @Viicos in #10121ImportStringspecial cases by @sydney-runkle in #10137__prefixed annotations by @sydney-runkle in #10136nullableschemas withserializationschema available during JSON Schema generation by @Viicos in #10132BaseModelannotations by @kc0506 in #10110PrivateAttrwithAnnotatedby @Viicos in #10157numbertype for literal and enum schemas by @Viicos in #10172MappingandMutableMappingannotations to use mapping schema instead of dict schema by @sydney-runkle in #10020field_serializerwith computed field when using*by @nix010 in pydantic/pydantic-core#1349Unionserializer before inference by @sydney-runkle in pydantic/pydantic-core#1398floatserialization behavior instrictmode by @sydney-runkle in pydantic/pydantic-core#1400exactnessinto Decimal validation logic to improve union validation behavior by @sydney-runkle in in pydantic/pydantic-core#1405pytest.warns()by @mgorny in #10241ModelMetaclassby @Viicos in #10242__init__by @Viicos in #10264BigIntserialization forintsubclasses by @kxx317 in pydantic/pydantic-core#1417infoby @sydney-runkle in #10277__pydantic_complete__is set when rebuildingdataclassesby @Viicos in #10291schema_generatorconfig value inTypeAdapterby @sydney-runkle in #10300Packaging
rufftov0.5.0andpyrighttov1.1.369by @sydney-runkle in #9801pydantic-extra-typestov2.9.0by @sydney-runkle in #9832pdm v2.18.1by @Viicos in #10138v1version stub tov1.10.18by @sydney-runkle in #10214pydantic-coretov2.23.2by @sydney-runkle in #10311New Contributors
pydanticpydantic-corev1.10.0Compare Source
dataclassdecorator to really act like its standard lib equivalent.It hence keeps
__eq__,__hash__, ... and makes comparison with its non-validated version possible.It also fixes usage of
frozendataclasses in fields and usage ofdefault_factoryin nested dataclasses.The support of
Config.extrahas been added.Finally, config customization directly via a
dictis now possible, #2557 by @PrettyWoodBREAKING CHANGES:
compiledboolean (whether pydantic is compiled with cython) has been moved frommain.pytoversion.pyConfig.extrais supported,dataclassignores by default extra arguments (likeBaseModel)__set_name__protocol inBaseModelfor PrivateAttrs, #4407 by @tlambert03parse_env_varinConfig, #4406 by @acmiyaguchimastertomain, #4405 by @hramezaniStrictStrdoes not raiseValidationErrorwhenmax_lengthis present inField, #4388 by @hramezaniSecretStrandSecretByteshashable, #4387 by @chbndrhnnsStrictBytesdoes not raiseValidationErrorwhenmax_lengthis present inField, #4380 by @JeanArhancettype, #4375 by @hramezanire.Pattern, #4366 by @hramezani__post_init_post_parse__is incorrectly passed keyword arguments when no__post_init__is defined, #4361 by @hramezaniForwardRefandCallablefrompydantic.typinginstead oftypingand also exposeMappingIntStrAny, #4358 by @aminalaeeAnytypes from thedataclassdecorator so it can be used with thedisallow_any_exprmypy option, #4356 by @DetachHeadpydantic/pydantic, #4348 by @yezz123Extra.forbidis validated multiple times, #4343 by @detachheadoneOfinstead ofanyOfwhen generating OpenAPI schema definitions, #4335 by @MaxwellPayneJsontype.Json[list[str]]will be now inferred aslist[str],Json[Any]should be used instead of plainJson.Runtime behaviour is not changed, #4332 by @Bobronium
alias is not Nonecheck, rather thanbool(alias), #4253 by @sergeytsaplinForwardRefs inField.outer_type_, #4249 by @JacobHayes__dataclass_transform__has been replaced bytyping_extensions.dataclass_transform, which is the preferred way to mark pydantic models as a dataclass under PEP 681, #4241 by @multimericConfigwhen validating nestedNamedTuplefields, #4219 by @synekBaseModel.constructto work with aliased Fields, #4192 by @kylebamossmart_deepcopyand revert todeepcopyif so, #4184 by @coneybeareConfig.anystr_upperandto_upperkwarg to constr and conbytes, #4165 by @sathelersetandfrozensetwhen they include default values, #4155 by @aminalaee@validatorare classmethods, #4102 by @DMRobertsonType[]in schema, #4051 by @aminalaeedefaultvalue in JSON Schema whenconst=True, #4031 by @aminalaeeallow_inf_nan, #3994 by @tiangoloenv_prefixhad characters in common withenv_nested_delimiter, #3975 by @arsenroncreate_model, #3945 by @hot123sBaseModel, #3920 by @irgolicMinus was serialized in incorrect place ("P-1DT23H59M59.888735S" instead of correct "-P1DT23H59M59.888735S"), #3899 by @07pepa
supports the following schemes:
cockroachdb,cockroachdb+psycopg2andcockroachdb+asyncpg, #3839 by @blubber__init__method in models, #3824 by @patrick91BaseModelinstances, #3777 by @PrettyWoodConstrainedDateandcondate, #3740 by @hottwajkw_onlyin dataclasses, #3670 by @detachheadColorclass, #3646 by @aminalaeeto_lower_camel()for "non pascal case" camel case, #3463 by @schlerpdefaultanddefault_factoryarguments in Mypy plugin, #3430 by @klaa97inspect.signatureforBaseModel, #3413 by @fix-inspect-signatureSecretFieldabstract class so that all the current and future secret fields likeSecretStrandSecretByteswill derive from it, #3409 by @expobrainPostgresDsn, #3337 by @rglskSecretsSettingsSourceto respectconfig.case_sensitive, #3273 by @JeanArhancetConfigErrorwhen multiple fields are incorrectly set for a single validator, #3215 by @SunsetOrangeFields insideAnnotatedforTypedDictsrequired, #3133 by @ezegomezint_validator, #3112 by @ojii__rich_repr__method toRepresentationclass which enables pretty printing with Rich, #3099 by @willmcguganAnyUrland descendent types, #3061 by @FaresAhmedbvalidate_argumentsdecorator now supportsalias, #3019 by @MAD-py__dict__and__weakref__attributes inAnyUrland IP address fields, #2890 by @nuno-andreFinalin a field type annotation, #2766 by @uriyyotyping_extensions>=4.1.0to guaranteedataclass_transformis available, #4424 by @commonismcopy_on_model_validationto reflect recent changes, #4369 by @samuelcolvin__slots__is passed tocreate_model,__slots__is then ignored, #4432 by @samuelcolvinBaseSettings.Configto avoid mypy errors, also correct mypy version compatibility notice in docs, #4450 by @samuelcolvinv1.9.2Compare Source
Revert Breaking Change: v1.9.1 introduced a breaking change where model fields were
deep copied by default, this release reverts the default behaviour to match v1.9.0 and before,
while also allow deep-copy behaviour via
copy_on_model_validation = 'deep'. See #4092 for more information.Config.copy_on_model_validationis now a str which must be'none','deep', or'shallow'corresponding to not copying, deep copy & shallow copy; default'shallow',#4093 by @timkpaine