diff --git a/src/marshmallow/schema.py b/src/marshmallow/schema.py index 78b386717..33fab6ceb 100644 --- a/src/marshmallow/schema.py +++ b/src/marshmallow/schema.py @@ -843,7 +843,12 @@ def _do_load( if self._has_processors(PRE_LOAD): try: processed_data = self._invoke_load_processors( - PRE_LOAD, data, many=many, original_data=data, partial=partial + PRE_LOAD, + data, + many=many, + original_data=data, + partial=partial, + unknown=unknown, ) except ValidationError as err: errors = err.normalized_messages() @@ -896,6 +901,7 @@ def _do_load( many=many, original_data=data, partial=partial, + unknown=unknown, ) except ValidationError as err: errors = err.normalized_messages() @@ -1076,7 +1082,8 @@ def _invoke_load_processors( *, many: bool, original_data, - partial: typing.Union[bool, types.StrSequenceOrSet] + partial: typing.Union[bool, types.StrSequenceOrSet], + unknown: str ): # This has to invert the order of the dump processors, so run the pass_many # processors first. @@ -1087,6 +1094,7 @@ def _invoke_load_processors( many=many, original_data=original_data, partial=partial, + unknown=unknown, ) data = self._invoke_processors( tag, @@ -1095,6 +1103,7 @@ def _invoke_load_processors( many=many, original_data=original_data, partial=partial, + unknown=unknown, ) return data