-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for enums #18
Conversation
Pipfile
Outdated
@@ -10,6 +10,8 @@ sphinx = "*" | |||
marshmallow = ">=2.0,<3.0" | |||
typing-inspect = "*" | |||
dataclasses = "*" | |||
marshmallow-dataclass = "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm this could be a mistaken addition to pipfile
, will remove
In fact, enums are already supported, but only in the marshmallow3 branch (published as a pre-release to pypi). I did not backport the feature, because I thought marshmallow 3 was going to be released soon, and we could merge it into master. Unfortunately, marshmallow 3 has been a pre-release for several months, and it looks like it won't be released anytime soon. So enum support is very welcome, but it should be a backport of how it is done in the marshmallow3 branch. Or even better, we may have a single branch (and a single release) that works with both marshmallow 2 and 3. Working with the two in parallel induces a lot of duplicated efforts and confusion. |
Hey @lovasoa that makes sense, I'm sorry I missed the support in the marshmallow 3 branch. I too have been waiting for marshmallow 3.x for quite some time and when it gets released a lot of my problems will go away. I will take a peek at your marshmallow 3 branch and see if I have any ideas on how to backport or write it once for both versions. Thanks |
Have a look now, I think this is what you had in mind |
Yep, it's perfect ! You can merge master (and especially 23ce55b) into your branch, and we'll be ready to merge. Don't forget to add |
Thanks for the code review, I will update this branch with those changes (I like the |
remove marshmallow dataclass from pipfile change implementation of the marshmallow enum support
bdc5b3a
to
fb4e03a
Compare
It's marges; thank you again @evanfwelch ! |
marshmallow_enum
is part of the marshmallow ecosystem. Accordingly, as a primary user of dataclasses, I would lovemarshmallow_dataclass
to support enums. This PR adds that functionality as well as the requisite doctests.