-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
feature request: support for Python 3.7 data classes #43
Comments
Definitely something we should look at supporting eventually. And it shouldn't be difficult, since they are basically a subset of attrs. |
Is this still under consideration? I'd be up for looking into it and seeing if I couldn't make a PR. |
@Tinche If you're willing to have this functionality I'd be happy to make a PR for it. I have existing code for this that I think would be fairly easy to integrate upstream. |
Sure. I would start by mimicking what the GenConverter does to generate functions for attrs classes, just for dataclasses. |
@ClaireNeveu did you have a chance to look at your existing code and see if it'd be PR-able? |
@asford I've put something together over at https://github.com/Tinche/cattrs/tree/tin/dataclasses. Want to try it out and see if it works for you? |
Ah, I did put something together but I've been pretty sick the past two weeks and haven't found time to PR it. |
Thanks for the awesome responses. @ClaireNeveu I hope you can take all the time you need to center on yourself and feel better. For what it's worth, a co-human-you've-probably-never-met-on-the-internet is sending well wishes. @Tinche looks great so far! I suspected this was going to be pretty doable, but glad to see it's not a massive or disruptive change. The hypothesis-driven tests are a little outside my zone of expertise, so I opened a sub-PR with the basic cases I'm working with. It required a few, minor additional fixes to use the |
Good news, this feature is essentially done! I expect to release it tomorrow. |
Released as 1.4.0. |
Would it be desirable/feasible to extend cattrs deserialization/serialization support to Python 3.7 Data Classes?
Or is it out of scope?
Thanks for this great little library.
The text was updated successfully, but these errors were encountered: