Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ Bug fixes:
- Fix typing of ``error_essages`` argument to `marshmallow.fields.Field` (:pr:`1636`).
Thanks :user:`repole` for reporting and :user:`dhruvildarji` for the PR.

Other changes:

- Add ``ipaddress.*`` to `marshmallow.Schema.TYPE_MAPPING` (:issue:`1695`).
Thanks :user:`liberforce` for the suggestion and :user:`dhruvildarji` for the PR.

4.2.2 (2026-02-04)
------------------

Expand Down
5 changes: 5 additions & 0 deletions src/marshmallow/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import decimal
import functools
import inspect
import ipaddress
import json
import operator
import typing
Expand Down Expand Up @@ -290,6 +291,10 @@ class AlbumSchema(Schema):
dt.date: ma_fields.Date,
dt.timedelta: ma_fields.TimeDelta,
decimal.Decimal: ma_fields.Decimal,
ipaddress.IPv4Address: ma_fields.IPv4,
ipaddress.IPv6Address: ma_fields.IPv6,
ipaddress.IPv4Interface: ma_fields.IPv4Interface,
ipaddress.IPv6Interface: ma_fields.IPv6Interface,
}
#: Overrides for default schema-level error messages
error_messages: dict[str, str] = {}
Expand Down