Sourced from pydantic's releases.
v2.12.4 2025-11-05
v2.12.4 (2025-11-05)
This is the fourth 2.12 patch release, fixing more regressions, and reverting a change in the
build()method of theAnyUrland Dsn types.This patch release also fixes an issue with the serialization of IP address types, when
serialize_as_anyis used. The next patch release will try to address the remaining issues with serialize as any behavior by introducing a new polymorphic serialization feature, that should be used in most cases in place of serialize as any.
Fix issue with forward references in parent
TypedDictclasses by@Viicosin #12427.This issue is only relevant on Python 3.14 and greater.
Exclude fields with
exclude_iffrom JSON Schema required fields by@Viicosin #12430Revert URL percent-encoding of credentials in the
build()method of theAnyUrland Dsn types by@davidhewittin pydantic-core#1833.This was initially considered as a bugfix, but caused regressions and as such was fully reverted. The next release will include an opt-in option to percent-encode components of the URL.
Add type inference for IP address types by
@davidhewittin pydantic-core#1868.The 2.12 changes to the
serialize_as_anybehavior made it so that IP address types could not properly serialize to JSON.Avoid getting default values from defaultdict by
@davidhewittin pydantic-core#1853.This fixes a subtle regression in the validation behavior of the
collections.defaultdicttype.Fix issue with field serializers on nested typed dictionaries by
@davidhewittin pydantic-core#1879.Add more
pydantic-corebuilds for the three-threaded version of Python 3.14 by@davidhewittin pydantic-core#1864.Full Changelog: https://github.com/pydantic/pydantic/compare/v2.12.3...v2.12.4
Sourced from pydantic's changelog.
v2.12.4 (2025-11-05)
This is the fourth 2.12 patch release, fixing more regressions, and reverting a change in the
build()method of theAnyUrland Dsn types.This patch release also fixes an issue with the serialization of IP address types, when
serialize_as_anyis used. The next patch release will try to address the remaining issues with serialize as any behavior by introducing a new polymorphic serialization feature, that should be used in most cases in place of serialize as any.
Fix issue with forward references in parent
TypedDictclasses by@Viicosin #12427.This issue is only relevant on Python 3.14 and greater.
Exclude fields with
exclude_iffrom JSON Schema required fields by@Viicosin #12430Revert URL percent-encoding of credentials in the
build()method of theAnyUrland Dsn types by@davidhewittin pydantic-core#1833.This was initially considered as a bugfix, but caused regressions and as such was fully reverted. The next release will include an opt-in option to percent-encode components of the URL.
Add type inference for IP address types by
@davidhewittin pydantic-core#1868.The 2.12 changes to the
serialize_as_anybehavior made it so that IP address types could not properly serialize to JSON.Avoid getting default values from defaultdict by
@davidhewittin pydantic-core#1853.This fixes a subtle regression in the validation behavior of the
collections.defaultdicttype.Fix issue with field serializers on nested typed dictionaries by
@davidhewittin pydantic-core#1879.Add more
pydantic-corebuilds for the three-threaded version of Python 3.14 by@davidhewittin pydantic-core#1864.
5c842df
Prepare release v2.12.4c678a71
Bump pydantic-core to v2.41.5a7cd292
Bump cloudpickle to v3.1.221f6278
Bump actions/setup-node from 5 to 68d6be8f
Bump astral-sh/setup-uv from 6 to 717865ea
Bump actions/upload-artifact from 4 to 590ad0af
Bump actions/download-artifact from 5 to 618e6672
Drop testing under PyPy 3.9650215b
Document workaround for MongoDsn default porte326790
Fix example of for bytes_invalid_encoding validation
error