Bump pydantic from 2.9.2 to 2.10.0
Bumps pydantic from 2.9.2 to 2.10.0.
Release notes
Sourced from pydantic's releases.
v2.10.0 2024-11-20
The code released in v2.10.0 is practically identical to that of v2.10.0b2. See the v2.10 release blog post for the highlights!
What's Changed
Packaging
- Bump
pydantic-core
tov2.27.0
by@sydney-runkle
in #10825- Replaced pdm with uv by
@frfahim
in #10727New Features
- Support
fractions.Fraction
by@sydney-runkle
in #10318- Support
Hashable
for json validation by@sydney-runkle
in #10324- Add a
SocketPath
type forlinux
systems by@theunkn0wn1
in #10378- Allow arbitrary refs in JSON schema
examples
by@sydney-runkle
in #10417- Support
defer_build
for Pydantic dataclasses by@Viicos
in #10313- Adding v1 / v2 incompatibility warning for nested v1 model by
@sydney-runkle
in #10431- Add support for unpacked
TypedDict
to type hint variadic keyword arguments with@validate_call
by@Viicos
in #10416- Support compiled patterns in
protected_namespaces
by@sydney-runkle
in #10522- Add support for
propertyNames
in JSON schema by@FlorianSW
in #10478- Adding
__replace__
protocol for Python 3.13+ support by@sydney-runkle
in #10596- Expose public
sort
method for JSON schema generation by@sydney-runkle
in #10595- Add runtime validation of
@validate_call
callable argument by@kc0506
in #10627- Add
experimental_allow_partial
support by@samuelcolvin
in #10748- Support default factories taking validated data as an argument by
@Viicos
in #10678- Allow subclassing
ValidationError
andPydanticCustomError
by@Youssefares
in pydantic/pydantic-core#1413- Add
trailing-strings
support toexperimental_allow_partial
by@sydney-runkle
in #10825- Add
rebuild()
method forTypeAdapter
and simplifydefer_build
patterns by@sydney-runkle
in #10537- Improve
TypeAdapter
instance repr by@sydney-runkle
in #10872Changes
- Don't allow customization of
SchemaGenerator
until interface is more stable by@sydney-runkle
in #10303- Cleanly
defer_build
onTypeAdapters
, removing experimental flag by@sydney-runkle
in #10329- Fix
mro
of generic subclass by@kc0506
in #10100- Strip whitespaces on JSON Schema title generation by
@sydney-runkle
in #10404- Use
b64decode
andb64encode
forBase64Bytes
type by@sydney-runkle
in #10486- Relax protected namespace config default by
@sydney-runkle
in #10441- Revalidate parametrized generics if instance's origin is subclass of OG class by
@sydney-runkle
in #10666- Warn if configuration is specified on the
@dataclass
decorator and with the__pydantic_config__
attribute by@sydney-runkle
in #10406- Recommend against using
Ellipsis
(...) withField
by@Viicos
in #10661- Migrate to subclassing instead of annotated approach for pydantic url types by
@sydney-runkle
in #10662- Change JSON schema generation of
Literal
s andEnums
by@Viicos
in #10692- Simplify unions involving
Any
orNever
when replacing type variables by@Viicos
in #10338- Do not require padding when decoding
base64
bytes by@bschoenmaeckers
in pydantic/pydantic-core#1448- Support dates all the way to 1BC by
@changhc
in pydantic/speedate#77Performance
... (truncated)
Changelog
Sourced from pydantic's changelog.
v2.10.0 (2024-11-20)
The code released in v2.10.0 is practically identical to that of v2.10.0b2.
See the v2.10 release blog post for the highlights!
What's Changed
Packaging
- Bump
pydantic-core
tov2.27.0
by@sydney-runkle
in #10825- Replaced pdm with uv by
@frfahim
in #10727New Features
- Support
fractions.Fraction
by@sydney-runkle
in #10318- Support
Hashable
for json validation by@sydney-runkle
in #10324- Add a
SocketPath
type forlinux
systems by@theunkn0wn1
in #10378- Allow arbitrary refs in JSON schema
examples
by@sydney-runkle
in #10417- Support
defer_build
for Pydantic dataclasses by@Viicos
in #10313- Adding v1 / v2 incompatibility warning for nested v1 model by
@sydney-runkle
in #10431- Add support for unpacked
TypedDict
to type hint variadic keyword arguments with@validate_call
by@Viicos
in #10416- Support compiled patterns in
protected_namespaces
by@sydney-runkle
in #10522- Add support for
propertyNames
in JSON schema by@FlorianSW
in #10478- Adding
__replace__
protocol for Python 3.13+ support by@sydney-runkle
in #10596- Expose public
sort
method for JSON schema generation by@sydney-runkle
in #10595- Add runtime validation of
@validate_call
callable argument by@kc0506
in #10627- Add
experimental_allow_partial
support by@samuelcolvin
in #10748- Support default factories taking validated data as an argument by
@Viicos
in #10678- Allow subclassing
ValidationError
andPydanticCustomError
by@Youssefares
in pydantic/pydantic-core#1413- Add
trailing-strings
support toexperimental_allow_partial
by@sydney-runkle
in #10825- Add
rebuild()
method forTypeAdapter
and simplifydefer_build
patterns by@sydney-runkle
in #10537- Improve
TypeAdapter
instance repr by@sydney-runkle
in #10872Changes
- Don't allow customization of
SchemaGenerator
until interface is more stable by@sydney-runkle
in #10303- Cleanly
defer_build
onTypeAdapters
, removing experimental flag by@sydney-runkle
in #10329- Fix
mro
of generic subclass by@kc0506
in #10100- Strip whitespaces on JSON Schema title generation by
@sydney-runkle
in #10404- Use
b64decode
andb64encode
forBase64Bytes
type by@sydney-runkle
in #10486- Relax protected namespace config default by
@sydney-runkle
in #10441- Revalidate parametrized generics if instance's origin is subclass of OG class by
@sydney-runkle
in #10666- Warn if configuration is specified on the
@dataclass
decorator and with the__pydantic_config__
attribute by@sydney-runkle
in #10406- Recommend against using
Ellipsis
(...) withField
by@Viicos
in #10661- Migrate to subclassing instead of annotated approach for pydantic url types by
@sydney-runkle
in #10662- Change JSON schema generation of
Literal
s andEnums
by@Viicos
in #10692- Simplify unions involving
Any
orNever
when replacing type variables by@Viicos
in #10338
... (truncated)
Commits
-
910bc54
Prep for v2.10.0 release (#10904) -
b94af2e
Makepre-commit
install easier (#10901) -
949bb06
Consistency with "python" rather than "
py" (#10900) -
4658021
Fix attributes format of code blocks in documentation (#10898) -
15caf41
fix indentation level (#10897) -
2b1cb8f
TypeAdapter
repr modification - use parens not brackets (#10880) -
40322e1
Updatetimedelta
docs with correct spec (#10879) -
4413892
ImproveTypeAdapter
instance repr (#10872) -
e526382
Subclass all single host url classes fromAnyUrl
to preserve behavior from ... -
c62d2d5
Docs updates: type adapter rebuild instructions (#10849) - Additional commits viewable in compare view