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

Fix Field.fail deprecation warning #35

Closed
wants to merge 2 commits into from

Conversation

lucasmbrown
Copy link

This PR fixes the Field.fail deprecation warning that can clog up the logs. See issue #32.

I'm new around here so apologies if there are developer conventions I've missed. This passes all unit tests and tox tests.

@lucasmbrown
Copy link
Author

@justanr @svidela - Are one of you game to merge this and cut a release? Thanks! I'd help but I'm not a contributor.

@svidela
Copy link
Contributor

svidela commented Dec 13, 2019

Hey @lucasmbrown! I'm not a maintainer actually. I simply made a small contribution once.

@lucasmbrown
Copy link
Author

@justanr -- are you able to merge and cut a release?

@timc13
Copy link

timc13 commented Mar 4, 2020

👍 what's the maintenance story on this repo? ....

@sloria
Copy link

sloria commented Mar 11, 2020

Could you just rename fail to make_error and set fail = make_error?

    def make_error(self, key, **kwargs):
        # ...

    fail = make_error  # marshmallow 2 compatibility

fail should only get called in marshmallow 2 anyway.

@toddkblake
Copy link

@lucasmbrown @sloria @justanr can we get a solution here?

@sloria
Copy link

sloria commented Mar 19, 2020

I don't have time to look into this myself (I'm not currently using this project--just happened upon this issue), but I believe my code snippet above should suffice to fix this.

@justanr
Copy link
Owner

justanr commented Jan 28, 2021

Should be fixed from merging #44 into next-release. Closing this on that assumption, but reopen if needed.

@justanr justanr closed this Jan 28, 2021
@ScottABrown
Copy link

ScottABrown commented Feb 8, 2022

Seems still present in marshmallow-enum==1.5.1. Is this in any released version yet?

$ grep -n fail ~/.virtualenvs/myproject/lib/python3.9/site-packages/marshmallow_enum/__init__.py | grep super
117: super(EnumField, self).fail(key, **kwargs)

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

Successfully merging this pull request may close these issues.

7 participants