Bump pydantic from 1.9.2 to 1.10.2
Created by: dependabot[bot]
Bumps pydantic from 1.9.2 to 1.10.2.
Release notes
Sourced from pydantic's releases.
v1.10.2 (2022-09-05)
- Revert Change: Revert percent encoding of URL parts which was originally added in #4224, #4470 by
@samuelcolvin
- Prevent long (length >
4_300
) strings/bytes as input to int fields, see python/cpython#95778 and CVE-2020-10735, #1477 by@samuelcolvin
- fix: dataclass wrapper was not always called, #4477 by
@PrettyWood
- Use
tomllib
on Python 3.11 when parsingmypy
configuration, #4476 by@hauntsaninja
- Basic fix of
GenericModel
cache to detect order of arguments inUnion
models, #4474 by@sveinugu
- Fix mypy plugin when using bare types like
list
anddict
asdefault_factory
, #4457 by@samuelcolvin
Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.1...v1.10.2
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
dataclass
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 offrozen
dataclasses in fields and usage ofdefault_factory
in nested dataclasses. The support ofConfig.extra
has been added. Finally, config customization directly via adict
is now possible, #2557 by@PrettyWood
BREAKING CHANGES:
- The
compiled
boolean (whether pydantic is compiled with cython) has been moved frommain.py
toversion.py
- Now that
Config.extra
is supported,dataclass
ignores by default extra arguments (likeBaseModel
)- Fix PEP487
__set_name__
protocol inBaseModel
for PrivateAttrs, #4407 by@tlambert03
- Allow for custom parsing of environment variables via
parse_env_var
inConfig
, #4406 by@acmiyaguchi
- Rename
master
tomain
, #4405 by@hramezani
- Fix
StrictStr
does not raiseValidationError
whenmax_length
is present inField
, #4388 by@hramezani
- Make
SecretStr
andSecretBytes
hashable, #4387 by@chbndrhnns
- Fix
StrictBytes
does not raiseValidationError
whenmax_length
is 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
ForwardRef
andCallable
frompydantic.typing
instead oftyping
and also exposeMappingIntStrAny
, #4358 by@aminalaee
- remove
Any
types from thedataclass
decorator so it can be used with thedisallow_any_expr
mypy option, #4356 by@DetachHead
- moved repo to
pydantic/pydantic
, #4348 by@yezz123
- fix "extra fields not permitted" error when dataclass with
Extra.forbid
is validated multiple times, #4343 by@detachhead
- Add Python 3.9 and 3.10 examples to docs, #4339 by
@Bobronium
- Discriminated union models now use
oneOf
instead ofanyOf
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 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 None
check, rather thanbool(alias)
, #4253 by@sergeytsaplin
- Update
ForwardRef
s 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
Config
when validating nestedNamedTuple
fields, #4219 by@synek
... (truncated)
Changelog
Sourced from pydantic's changelog.
v1.10.2 (2022-09-05)
- Revert Change: Revert percent encoding of URL parts which was originally added in #4224, #4470 by
@samuelcolvin
- Prevent long (length >
4_300
) strings/bytes as input to int fields, see python/cpython#95778 and CVE-2020-10735, #1477 by@samuelcolvin
- fix: dataclass wrapper was not always called, #4477 by
@PrettyWood
- Use
tomllib
on Python 3.11 when parsingmypy
configuration, #4476 by@hauntsaninja
- Basic fix of
GenericModel
cache to detect order of arguments inUnion
models, #4474 by@sveinugu
- Fix mypy plugin when using bare types like
list
anddict
asdefault_factory
, #4457 by@samuelcolvin
v1.10.1 (2022-08-31)
v1.10.0 (2022-08-30)
- Refactor the whole pydantic
dataclass
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 offrozen
dataclasses in fields and usage ofdefault_factory
in nested dataclasses. The support ofConfig.extra
has been added. Finally, config customization directly via adict
is now possible, #2557 by@PrettyWood
BREAKING CHANGES:
- The
compiled
boolean (whether pydantic is compiled with cython) has been moved frommain.py
toversion.py
- Now that
Config.extra
is supported,dataclass
ignores by default extra arguments (likeBaseModel
)- Fix PEP487
__set_name__
protocol inBaseModel
for PrivateAttrs, #4407 by@tlambert03
- Allow for custom parsing of environment variables via
parse_env_var
inConfig
, #4406 by@acmiyaguchi
- Rename
master
tomain
, #4405 by@hramezani
- Fix
StrictStr
does not raiseValidationError
whenmax_length
is present inField
, #4388 by@hramezani
- Make
SecretStr
andSecretBytes
hashable, #4387 by@chbndrhnns
- Fix
StrictBytes
does not raiseValidationError
whenmax_length
is 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
ForwardRef
andCallable
frompydantic.typing
instead oftyping
and also exposeMappingIntStrAny
, #4358 by@aminalaee
- remove
Any
types from thedataclass
decorator so it can be used with thedisallow_any_expr
mypy option, #4356 by@DetachHead
- moved repo to
pydantic/pydantic
, #4348 by@yezz123
- fix "extra fields not permitted" error when dataclass with
Extra.forbid
is validated multiple times, #4343 by@detachhead
- Add Python 3.9 and 3.10 examples to docs, #4339 by
@Bobronium
- Discriminated union models now use
oneOf
instead ofanyOf
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 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 None
check, rather thanbool(alias)
, #4253 by@sergeytsaplin
- Update
ForwardRef
s 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
Config
when validating nestedNamedTuple
fields, #4219 by@synek
- Update
BaseModel.construct
to work with aliased Fields, #4192 by@kylebamos
... (truncated)
Commits
-
bc74342
prepare for v1.10.2 -
f1e9883
fix: dataclass wrapper was not always called (#4484) -
91bb8d4
Basic fix of GenericModel cache to detect order of args in Union models [#447... -
eccd85e
prevent long strings as int inputs (#4480) -
a4367c1
Revert percent encoding in URLs. (#4470) -
02cf7f5
fix mypy withdefault_factory=list
etc. (#4471) -
5a2ddec
Use tomllib on Python 3.11 (#4476) -
317bef3
build(deps): bump black from 22.6.0 to 22.8.0 (#4465) -
2add8a9
build(deps): bump hypothesis from 6.54.3 to 6.54.4 (#4464) -
f1fb4f2
build(deps): bump mkdocs-material from 8.4.0 to 8.4.2 (#4463) - 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 rebase
will rebase this PR -
@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it -
@dependabot merge
will merge this PR after your CI passes on it -
@dependabot squash and merge
will squash and merge this PR after your CI passes on it -
@dependabot cancel merge
will cancel a previously requested merge and block automerging -
@dependabot reopen
will reopen this PR if it is closed -
@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot ignore this major version
will 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 version
will 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 dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)