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).
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 ontakes_self
parameter to factory (does not exist in dataclasses).Fixes
Fixes #945
get_attr_data
doesn't handle default factory correctly