Bump pydantic from 2.8.2 to 2.9.0
Bumps pydantic from 2.8.2 to 2.9.0.
Release notes
Sourced from pydantic's releases.
v2.9.0 (2024-09-05)
The code released in v2.9.0 is practically identical to that of v2.9.0b2.
Check out our blog post to learn more about the release highlights!
What's Changed
Packaging
- Bump
ruff
tov0.5.0
andpyright
tov1.1.369
by@sydney-runkle
in #9801- Bump
pydantic-extra-types
tov2.9.0
by@sydney-runkle
in #9832- Support compatibility with
pdm v2.18.1
by@Viicos
in #10138- Bump
v1
version stub tov1.10.18
by@sydney-runkle
in #10214- Bump
pydantic-core
tov2.23.2
by@sydney-runkle
in #10311New Features
- Add support for
ZoneInfo
by@Youssefares
in #9896- Add
Config.val_json_bytes
by@josh-newman
in #9770- Add DSN for Snowflake by
@aditkumar72
in #10128- Support
complex
number by@changhc
in #9654- Add support for
annotated_types.Not
by@aditkumar72
in #10210- Allow
WithJsonSchema
to inject$ref
s w/http
orhttps
links by@dAIsySHEng1
in #9863- Allow validators to customize validation JSON schema by
@Viicos
in #10094- Support parametrized
PathLike
types by@nix010
in #9764- Add tagged union serializer that attempts to use
str
orcallable
discriminators to select the correct serializer by@sydney-runkle
in in pydantic/pydantic-core#1397Changes
- Breaking Change: Merge
dict
typejson_schema_extra
by@sydney-runkle
in #9792
- For more info (how to replicate old behavior) on this change, see here
- Refactor annotation injection for known (often generic) types by
@sydney-runkle
in #9979- Move annotation compatibility errors to validation phase by
@sydney-runkle
in #9999- Improve runtime errors for string constraints like
pattern
for incompatible types by@sydney-runkle
in #10158- Remove
'allOf'
JSON schema workarounds by@dpeachey
in #10029- Remove
typed_dict_cls
data fromCoreMetadata
by@sydney-runkle
in #10180- Deprecate passing a dict to the
Examples
class by@Viicos
in #10181- Remove
initial_metadata
from internal metadata construct by@sydney-runkle
in #10194- Use
re.Pattern.search
instead ofre.Pattern.match
for consistency withrust
behavior by@tinez
in pydantic/pydantic-core#1368- Show value of wrongly typed data in
pydantic-core
serialization warning by@BoxyUwU
in pydantic/pydantic-core#1377- Breaking Change: in
pydantic-core
, changemetadata
type hint in core schemas fromAny
->Dict[str, Any] | None
by@sydney-runkle
in pydantic/pydantic-core#1411- Raise helpful warning when
self
isn't returned from model validator by@sydney-runkle
in #10255Performance
- Initial start at improving import times for modules, using caching primarily by
@sydney-runkle
in #10009- Using cached internal import for
BaseModel
by@sydney-runkle
in #10013- Simplify internal generics logic - remove generator overhead by
@sydney-runkle
in #10059- Remove default module globals from types namespace by
@sydney-runkle
in #10123- Performance boost: skip caching parent namespaces in most cases by
@sydney-runkle
in #10113
... (truncated)
Changelog
Sourced from pydantic's changelog.
v2.9.0 (2024-09-05)
The code released in v2.9.0 is practically identical to that of v2.9.0b2.
What's Changed
Packaging
- Bump
ruff
tov0.5.0
andpyright
tov1.1.369
by@sydney-runkle
in #9801- Bump
pydantic-extra-types
tov2.9.0
by@sydney-runkle
in #9832- Support compatibility with
pdm v2.18.1
by@Viicos
in #10138- Bump
v1
version stub tov1.10.18
by@sydney-runkle
in #10214- Bump
pydantic-core
tov2.23.2
by@sydney-runkle
in #10311New Features
- Add support for
ZoneInfo
by@Youssefares
in #9896- Add
Config.val_json_bytes
by@josh-newman
in #9770- Add DSN for Snowflake by
@aditkumar72
in #10128- Support
complex
number by@changhc
in #9654- Add support for
annotated_types.Not
by@aditkumar72
in #10210- Allow
WithJsonSchema
to inject$ref
s w/http
orhttps
links by@dAIsySHEng1
in #9863- Allow validators to customize validation JSON schema by
@Viicos
in #10094- Support parametrized
PathLike
types by@nix010
in #9764- Add tagged union serializer that attempts to use
str
orcallable
discriminators to select the correct serializer by@sydney-runkle
in in pydantic/pydantic-core#1397Changes
- Breaking Change: Merge
dict
typejson_schema_extra
by@sydney-runkle
in #9792
- For more info (how to replicate old behavior) on this change, see here
- Refactor annotation injection for known (often generic) types by
@sydney-runkle
in #9979- Move annotation compatibility errors to validation phase by
@sydney-runkle
in #9999- Improve runtime errors for string constraints like
pattern
for incompatible types by@sydney-runkle
in #10158- Remove
'allOf'
JSON schema workarounds by@dpeachey
in #10029- Remove
typed_dict_cls
data fromCoreMetadata
by@sydney-runkle
in #10180- Deprecate passing a dict to the
Examples
class by@Viicos
in #10181- Remove
initial_metadata
from internal metadata construct by@sydney-runkle
in #10194- Use
re.Pattern.search
instead ofre.Pattern.match
for consistency withrust
behavior by@tinez
in pydantic/pydantic-core#1368- Show value of wrongly typed data in
pydantic-core
serialization warning by@BoxyUwU
in pydantic/pydantic-core#1377- Breaking Change: in
pydantic-core
, changemetadata
type hint in core schemas fromAny
->Dict[str, Any] | None
by@sydney-runkle
in pydantic/pydantic-core#1411- Raise helpful warning when
self
isn't returned from model validator by@sydney-runkle
in #10255Performance
- Initial start at improving import times for modules, using caching primarily by
@sydney-runkle
in #10009- Using cached internal import for
BaseModel
by@sydney-runkle
in #10013- Simplify internal generics logic - remove generator overhead by
@sydney-runkle
in #10059- Remove default module globals from types namespace by
@sydney-runkle
in #10123
... (truncated)
Commits
-
ed92d0a
Prep for v2.9 release (#10311) -
eecde7b
Fix lifecycle docs formatting (#10309) -
447879b
Add schema generation benchmarks for models with custom serializers (#10290) -
91a4993
Add link for complex docs (#10301) -
8a01cc8
Respectschema_generator
config value inTypeAdapter
(#10300) -
5c24abb
Ensure__pydantic_complete__
is set when rebuilding dataclasses (#10291) -
0a78494
Try fix forcoverage
with hidden files (#10298) -
d7e8125
Ensure coverage data artifact is correctly uploaded (#10292) -
c109563
Support signature for wrap validators withoutinfo
(#10277) -
0115f7b
Reformat + add some benchmarks for annotated validators (#10276) - Additional commits viewable in compare view