beet
beet copied to clipboard
chore(deps): bump pydantic from 1.9.1 to 1.10.1
Bumps pydantic from 1.9.1 to 1.10.1.
Release notes
Sourced from pydantic's releases.
v1.10.1 (2022-08-31)
Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.0...v1.10.1
v1.10.0 (2022-08-30)
See #4419 for feedback and discussion, docs are live at pydantic-docs.helpmanual.io.
- Refactor the whole pydantic
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 offrozendataclasses in fields and usage ofdefault_factoryin nested dataclasses. The support ofConfig.extrahas been added. Finally, config customization directly via adictis now possible, #2557 by@PrettyWoodBREAKING CHANGES:
- The
compiledboolean (whether pydantic is compiled with cython) has been moved frommain.pytoversion.py- Now that
Config.extrais supported,dataclassignores by default extra arguments (likeBaseModel)- Fix PEP487
__set_name__protocol inBaseModelfor PrivateAttrs, #4407 by@tlambert03- Allow for custom parsing of environment variables via
parse_env_varinConfig, #4406 by@acmiyaguchi- Rename
mastertomain, #4405 by@hramezani- Fix
StrictStrdoes not raiseValidationErrorwhenmax_lengthis present inField, #4388 by@hramezani- Make
SecretStrandSecretByteshashable, #4387 by@chbndrhnns- Fix
StrictBytesdoes not raiseValidationErrorwhenmax_lengthis present inField, #4380 by@JeanArhancet- Add support for bare
type, #4375 by@hramezani- Support Python 3.11, including binaries for 3.11 in PyPI, #4374 by
@samuelcolvin- Add support for
re.Pattern, #4366 by@hramezani- Fix
__post_init_post_parse__is incorrectly passed keyword arguments when no__post_init__is defined, #4361 by@hramezani- Fix implicitly importing
ForwardRefandCallablefrompydantic.typinginstead oftypingand also exposeMappingIntStrAny, #4358 by@aminalaee- remove
Anytypes from thedataclassdecorator so it can be used with thedisallow_any_exprmypy option, #4356 by@DetachHead- moved repo to
pydantic/pydantic, #4348 by@yezz123- fix "extra fields not permitted" error when dataclass with
Extra.forbidis validated multiple times, #4343 by@detachhead- Add Python 3.9 and 3.10 examples to docs, #4339 by
@Bobronium- Discriminated union models now use
oneOfinstead ofanyOfwhen generating OpenAPI schema definitions, #4335 by@MaxwellPayne- Allow type checkers to infer inner type of
Jsontype.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- Allow empty string aliases by using a
alias is not Nonecheck, rather thanbool(alias), #4253 by@sergeytsaplin- Update
ForwardRefs inField.outer_type_, #4249 by@JacobHayes- The use of
__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@multimeric- Use parent model's
Configwhen validating nestedNamedTuplefields, #4219 by@synek- Update
BaseModel.constructto work with aliased Fields, #4192 by@kylebamos- Catch certain raised errors in
smart_deepcopyand revert todeepcopyif so, #4184 by@coneybeare- Add
Config.anystr_upperandto_upperkwarg to constr and conbytes, #4165 by@satheler- Fix JSON schema for
setandfrozensetwhen they include default values, #4155 by@aminalaee- Teach the mypy plugin that methods decorated by
@validatorare classmethods, #4102 by@DMRobertson- Improve mypy plugin's ability to detect required fields, #4086 by
@richardxia- Support fields of type
Type[]in schema, #4051 by@aminalaee- Add
defaultvalue in JSON Schema whenconst=True, #4031 by@aminalaee- Adds reserved word check to signature generation logic, #4011 by
@strue36- Fix Json strategy failure for the complex nested field, #4005 by
@sergiosim
... (truncated)
Changelog
Sourced from pydantic's changelog.
v1.10.1 (2022-08-31)
v1.10.0 (2022-08-30)
- Refactor the whole pydantic
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 offrozendataclasses in fields and usage ofdefault_factoryin nested dataclasses. The support ofConfig.extrahas been added. Finally, config customization directly via adictis now possible, #2557 by@PrettyWoodBREAKING CHANGES:
- The
compiledboolean (whether pydantic is compiled with cython) has been moved frommain.pytoversion.py- Now that
Config.extrais supported,dataclassignores by default extra arguments (likeBaseModel)- Fix PEP487
__set_name__protocol inBaseModelfor PrivateAttrs, #4407 by@tlambert03- Allow for custom parsing of environment variables via
parse_env_varinConfig, #4406 by@acmiyaguchi- Rename
mastertomain, #4405 by@hramezani- Fix
StrictStrdoes not raiseValidationErrorwhenmax_lengthis present inField, #4388 by@hramezani- Make
SecretStrandSecretByteshashable, #4387 by@chbndrhnns- Fix
StrictBytesdoes not raiseValidationErrorwhenmax_lengthis present inField, #4380 by@JeanArhancet- Add support for bare
type, #4375 by@hramezani- Support Python 3.11, including binaries for 3.11 in PyPI, #4374 by
@samuelcolvin- Add support for
re.Pattern, #4366 by@hramezani- Fix
__post_init_post_parse__is incorrectly passed keyword arguments when no__post_init__is defined, #4361 by@hramezani- Fix implicitly importing
ForwardRefandCallablefrompydantic.typinginstead oftypingand also exposeMappingIntStrAny, #4358 by@aminalaee- remove
Anytypes from thedataclassdecorator so it can be used with thedisallow_any_exprmypy option, #4356 by@DetachHead- moved repo to
pydantic/pydantic, #4348 by@yezz123- fix "extra fields not permitted" error when dataclass with
Extra.forbidis validated multiple times, #4343 by@detachhead- Add Python 3.9 and 3.10 examples to docs, #4339 by
@Bobronium- Discriminated union models now use
oneOfinstead ofanyOfwhen generating OpenAPI schema definitions, #4335 by@MaxwellPayne- Allow type checkers to infer inner type of
Jsontype.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- Allow empty string aliases by using a
alias is not Nonecheck, rather thanbool(alias), #4253 by@sergeytsaplin- Update
ForwardRefs inField.outer_type_, #4249 by@JacobHayes- The use of
__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@multimeric- Use parent model's
Configwhen validating nestedNamedTuplefields, #4219 by@synek- Update
BaseModel.constructto work with aliased Fields, #4192 by@kylebamos- Catch certain raised errors in
smart_deepcopyand revert todeepcopyif so, #4184 by@coneybeare- Add
Config.anystr_upperandto_upperkwarg to constr and conbytes, #4165 by@satheler- Fix JSON schema for
setandfrozensetwhen they include default values, #4155 by@aminalaee- Teach the mypy plugin that methods decorated by
@validatorare classmethods, #4102 by@DMRobertson- Improve mypy plugin's ability to detect required fields, #4086 by
@richardxia- Support fields of type
Type[]in schema, #4051 by@aminalaee- Add
defaultvalue in JSON Schema whenconst=True, #4031 by@aminalaee- Adds reserved word check to signature generation logic, #4011 by
@strue36- Fix Json strategy failure for the complex nested field, #4005 by
@sergiosim- Add JSON-compatible float constraint
allow_inf_nan, #3994 by@tiangolo- Remove undefined behaviour when
env_prefixhad characters in common withenv_nested_delimiter, #3975 by@arsenron
... (truncated)
Commits
32ea885prepare for v1.10.13a2e83cAdd hash operator to Color class (#4455)64f2472v1.10 :boom: (#4452)b065908fix type hints inBaseSettings.Config(#4450)f8575aaprepare for v1.10.0b1 release0244b06Warn and ignore__slots__argument tocreate_model(#4432)934adc1prepare for v1.10.0a2 releasef708c32avoid docs update on pre-release (#4429)9420c2bAdd how to skip the change file check to pull request template (#4428)135e3a5setup - require typing_extensions>=4.1.0 for dataclass_transform (#4424)- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
-
@dependabot rebasewill rebase this PR -
@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it -
@dependabot mergewill merge this PR after your CI passes on it -
@dependabot squash and mergewill squash and merge this PR after your CI passes on it -
@dependabot cancel mergewill cancel a previously requested merge and block automerging -
@dependabot reopenwill reopen this PR if it is closed -
@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)