Open danielbjerk opened 4 months ago
I can confirm this issue with python greater than 3.10. The suggested solution is will work however, i believe this would work as well: field(default_factory=ModelCreationConfig) field(default_factory=SimulationArgs) field(default_factory=ApplicationConfig) field(default_factory=TestConfig)
Describe the bug Attempting to use gridapps.simulation with python 3.11 will result in ValueError due to Python 3.11 changing dataclass to be non-backwards compatible (see i.e. this discussion). The ValueError is due to SimulationArgs, SimulationConfig, having class defaults (ModelCreationConfig and SimulationArgs, ApplicationConfig, TestConfig, respectively).
To Reproduce
Proposed solution Use default_factory for these fields as well.
and
Elsewise, README and pyproject-dotfiles should be changed to reflect <3.11 requirement.
See also this issue for inspiration