Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

Marshmallow 3 DeprecationWarning: Field.fail is deprecated. Use raise self.make_error("by_name", ...) instead #32

Open
austinbutler opened this issue Oct 1, 2019 · 1 comment

Comments

@austinbutler
Copy link

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

@svidela
Copy link
Contributor

svidela commented Nov 13, 2019

Hi!

@justanr are you planning to fix this warning? Or would you consider a PR maybe?

cheers!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants