omegaconf
omegaconf copied to clipboard
fix: `get_attr_data` doesn't handle default factory correctly
Motivation
get_attr_data() didn't check default values for "factory" types, which need to be called in order to get the real default value, so several use cases that worked with dataclasses were broken for attrs classes.
Test Plan
New fixture parameter added for "factory" variant of the tests/structured_conf/data/ attrs classes, similar to the post-Python 3.11 dataclass tests.
New test added for error on takes_self parameter to factory (does not exist in dataclasses).
Fixes
Fixes #945 get_attr_data doesn't handle default factory correctly
Hi, Is there an expected release date for this PR?
Hi, Is there an expected release date for this PR?
No, there's no ETA yet for the next Hydra release.
@Jasha10, good to merge?