marshmallow_enum
marshmallow_enum copied to clipboard
Marshmallow 3 DeprecationWarning: Field.fail is deprecated. Use raise self.make_error("by_name", ...) instead
Simply changing super(EnumField, self).fail(key, **kwargs)
to raise super(EnumField, self).make_error(key, **kwargs)
seems to work for Marshmallow 3 on Python 3 but fails for Python 2, at least when running tox locally.
https://marshmallow.readthedocs.io/en/stable/upgrading.html#field-fail-is-deprecated-in-favor-of-field-make-error
Hi!
@justanr are you planning to fix this warning? Or would you consider a PR maybe?
cheers!