Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let IP fields inherit String #2250

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions src/marshmallow/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -1741,7 +1741,7 @@ def __init__(self, *args, **kwargs) -> None:
self.validators.insert(0, validator)


class IP(Field):
class IP(String):
"""A IP address field.

:param bool exploded: If `True`, serialize ipv6 address in long form, ie. with groups
Expand Down Expand Up @@ -1800,7 +1800,7 @@ class IPv6(IP):
DESERIALIZATION_CLASS = ipaddress.IPv6Address


class IPInterface(Field):
class IPInterface(String):
"""A IPInterface field.

IP interface is the non-strict form of the IPNetwork type where arbitrary host
Expand Down