-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fix empty __init__ limitation for dataclasses #14
Comments
This issue may provide some other ideas as well |
Refer to #13 (comment) for a few ideas |
Quoting @kmike here (from #13 (comment))
|
Just adding a new bit of info. |
Do we consider this a bug report or a feature request? 🙂 |
I guess it goes down to the change. |
Hm, that's an interesting workaround. It means that user can't create
Product(name='Plasma Tv', price=999.98)
manually. I'm not sure I understand all consequences. It seems we don't testinit=False
dataclasses in itemadapter (//cc @elacuesta), I'm not sure what's the behavior e.g. with serialization, if fields are missing.Overall, this looks like an issue in itemloader which can be fixed, not a problem with dataclasses or itemadapter. Fixing it is out of scope for this PR though.
What do you think about asking to provide default field values instead, and saying "currently" when explaining this limitation? We may want to lift it in future.
Originally posted by @kmike in #13
The text was updated successfully, but these errors were encountered: