2023.djangocon.us
2023.djangocon.us copied to clipboard
Bump pydantic from 2.0.3 to 2.4.0 in /bin
Bumps pydantic from 2.0.3 to 2.4.0.
Release notes
Sourced from pydantic's releases.
v2.4.0 2023-09-25
What's Changed
Packaging
- Update pydantic-core to 2.10.0 by
@samuelcolvin
in #7542New Features
- Add
Base64Url
types by@dmontagu
in #7286- Implement optional
number
tostr
coercion by@lig
in #7508- Allow access to
field_name
anddata
in all validators if there is data and a field name by@samuelcolvin
in #7542- Add
BaseModel.model_validate_strings
andTypeAdapter.validate_strings
by@hramezani
in #7552- Add Pydantic
plugins
experimental implementation by@lig
@samuelcolvin
and@Kludex
in #6820Changes
- Do not override
model_post_init
in subclass with private attrs by@Viicos
in #7302- Make fields with defaults not required in the serialization schema by default by
@dmontagu
in #7275- Mark
Extra
as deprecated by@disrupted
in #7299- Make
EncodedStr
a dataclass by@Kludex
in #7396- Move
annotated_handlers
to be public by@samuelcolvin
in #7569Performance
- Simplify flattening and inlining of
CoreSchema
by@adriangb
in #7523- Remove unused copies in
CoreSchema
walking by@adriangb
in #7528- Add caches for collecting definitions and invalid schemas from a CoreSchema by
@adriangb
in #7527- Eagerly resolve discriminated unions and cache cases where we can't by
@adriangb
in #7529- Replace
dict.get
anddict.setdefault
with more verbose versions inCoreSchema
building hot paths by@adriangb
in #7536- Cache invalid
CoreSchema
discovery by@adriangb
in #7535- Allow disabling
CoreSchema
validation for faster startup times by@adriangb
in #7565Fixes
- Fix config detection for
TypedDict
from grandparent classes by@dmontagu
in #7272- Fix hash function generation for frozen models with unusual MRO by
@dmontagu
in #7274- Make
strict
config overridable in field for Path by@hramezani
in #7281- Use
ser_json_<timedelta|bytes>
on default inGenerateJsonSchema
by@Kludex
in #7269- Adding a check that alias is validated as an identifier for Python by
@andree0
in #7319- Raise an error when computed field overrides field by
@sydney-runkle
in #7346- Fix applying
SkipValidation
to referenced schemas by@adriangb
in #7381- Enforce behavior of private attributes having double leading underscore by
@lig
in #7265- Standardize
__get_pydantic_core_schema__
signature by@hramezani
in #7415- Fix generic dataclass fields mutation bug (when using
TypeAdapter
) by@sydney-runkle
in #7435- Fix
TypeError
onmodel_validator
inwrap
mode by@pmmmwh
in #7496- Improve enum error message by
@hramezani
in #7506- Make
repr
work for instances that failed initialization when handlingValidationError
s by@dmontagu
in #7439- Fixed a regular expression denial of service issue by limiting whitespaces by
@prodigysml
in #7360- Fix handling of
UUID
values havingUUID.version=None
by@lig
in #7566
... (truncated)
Changelog
Sourced from pydantic's changelog.
v2.4.0 (2023-09-22)
What's Changed
Packaging
- Update pydantic-core to 2.10.0 by
@samuelcolvin
in #7542New Features
- Add
Base64Url
types by@dmontagu
in #7286- Implement optional
number
tostr
coercion by@lig
in #7508- Allow access to
field_name
anddata
in all validators if there is data and a field name by@samuelcolvin
in #7542- Add
BaseModel.model_validate_strings
andTypeAdapter.validate_strings
by@hramezani
in #7552- Add Pydantic
plugins
experimental implementation by@lig
@samuelcolvin
and@Kludex
in #6820Changes
- Do not override
model_post_init
in subclass with private attrs by@Viicos
in #7302- Make fields with defaults not required in the serialization schema by default by
@dmontagu
in #7275- Mark
Extra
as deprecated by@disrupted
in #7299- Make
EncodedStr
a dataclass by@Kludex
in #7396- Move
annotated_handlers
to be public by@samuelcolvin
in #7569Performance
- Simplify flattening and inlining of
CoreSchema
by@adriangb
in #7523- Remove unused copies in
CoreSchema
walking by@adriangb
in #7528- Add caches for collecting definitions and invalid schemas from a CoreSchema by
@adriangb
in #7527- Eagerly resolve discriminated unions and cache cases where we can't by
@adriangb
in #7529- Replace
dict.get
anddict.setdefault
with more verbose versions inCoreSchema
building hot paths by@adriangb
in #7536- Cache invalid
CoreSchema
discovery by@adriangb
in #7535- Allow disabling
CoreSchema
validation for faster startup times by@adriangb
in #7565Fixes
- Fix config detection for
TypedDict
from grandparent classes by@dmontagu
in #7272- Fix hash function generation for frozen models with unusual MRO by
@dmontagu
in #7274- Make
strict
config overridable in field for Path by@hramezani
in #7281- Use
ser_json_<timedelta|bytes>
on default inGenerateJsonSchema
by@Kludex
in #7269- Adding a check that alias is validated as an identifier for Python by
@andree0
in #7319- Raise an error when computed field overrides field by
@sydney-runkle
in #7346- Fix applying
SkipValidation
to referenced schemas by@adriangb
in #7381- Enforce behavior of private attributes having double leading underscore by
@lig
in #7265- Standardize
__get_pydantic_core_schema__
signature by@hramezani
in #7415- Fix generic dataclass fields mutation bug (when using
TypeAdapter
) by@sydney-runkle
in #7435- Fix
TypeError
onmodel_validator
inwrap
mode by@pmmmwh
in #7496- Improve enum error message by
@hramezani
in #7506
... (truncated)
Commits
1f59075
fix unintentional drop of character in HISTORY (#7600)7183c3e
addingmkdocs_run_deps
to docs (#7602)cd44ac1
Add missing@Kludex
mention to theHISTORY.md
(#7603)6136b9a
Prepare release 2.4.0 (#7568)389c074
Revert unecessary regex change from e4393ae (#7599)4279fc5
WIP fixing redirects (#7596)829af25
Improvements to version info message (#7594)cc4b8c2
Small improvements to import performance (#7590)0af0cc3
revert plugin performance regression (#7589)0c760c0
improve formatting of generated release notes (#7592)- 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 show <dependency name> ignore conditions
will show all of the ignore conditions of the specified dependency -
@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) You can disable automated security fix PRs for this repo from the Security Alerts page.