From 47f0930c1adfd92cf6fb7651d6303ee7b4decb34 Mon Sep 17 00:00:00 2001 From: Steven Loria Date: Mon, 30 Dec 2024 14:50:10 -0500 Subject: [PATCH] Remove default and missing properties (#2702) --- src/marshmallow/fields.py | 42 --------------------------------------- 1 file changed, 42 deletions(-) diff --git a/src/marshmallow/fields.py b/src/marshmallow/fields.py index b27672600..384f98ed5 100644 --- a/src/marshmallow/fields.py +++ b/src/marshmallow/fields.py @@ -418,48 +418,6 @@ def context(self): """The context dictionary for the parent :class:`Schema`.""" return self.parent.context - # the default and missing properties are provided for compatibility and - # emit warnings when they are accessed and set - @property - def default(self): - warnings.warn( - "The 'default' attribute of fields is deprecated. " - "Use 'dump_default' instead.", - RemovedInMarshmallow4Warning, - stacklevel=2, - ) - return self.dump_default - - @default.setter - def default(self, value): - warnings.warn( - "The 'default' attribute of fields is deprecated. " - "Use 'dump_default' instead.", - RemovedInMarshmallow4Warning, - stacklevel=2, - ) - self.dump_default = value - - @property - def missing(self): - warnings.warn( - "The 'missing' attribute of fields is deprecated. " - "Use 'load_default' instead.", - RemovedInMarshmallow4Warning, - stacklevel=2, - ) - return self.load_default - - @missing.setter - def missing(self, value): - warnings.warn( - "The 'missing' attribute of fields is deprecated. " - "Use 'load_default' instead.", - RemovedInMarshmallow4Warning, - stacklevel=2, - ) - self.load_default = value - class Raw(Field): """Field that applies no formatting."""