Skip to content
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 python3.12 dataclass issues #6620

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

maxtropets
Copy link
Contributor

@maxtropets maxtropets commented Nov 8, 2024

Fixes:

56:   File "/usr/lib/python3.12/dataclasses.py", line 1268, in dataclass
56:     return wrap(cls)
56:            │    └ <class 'infra.interfaces.NodeByRoleResolver'>
56:            └ <function dataclass.<locals>.wrap at 0x7f6a3b28e160>
...
56:   File "/usr/lib/python3.12/dataclasses.py", line 852, in _get_field
56:     raise ValueError(f'mutable default {type(f.default)} for field '
56: ValueError: mutable default <class 'infra.interfaces.TargetRole'> for field target is not allowed: use default_factory

Part of #6588

@maxtropets maxtropets self-assigned this Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant