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

pytest failing with python 3.11 #57

Open
benallard opened this issue May 4, 2023 · 0 comments · May be fixed by #58
Open

pytest failing with python 3.11 #57

benallard opened this issue May 4, 2023 · 0 comments · May be fixed by #58

Comments

@benallard
Copy link

ImportError while loading conftest '/home/ben/aur/python-hologram/src/hologram-0.0.16/tests/conftest.py'.
tests/conftest.py:67: in <module>
    @dataclass
/usr/lib/python3.11/dataclasses.py:1223: in dataclass
    return wrap(cls)
/usr/lib/python3.11/dataclasses.py:1213: in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
/usr/lib/python3.11/dataclasses.py:958: in _process_class
    cls_fields.append(_get_field(cls, name, type, kw_only))
/usr/lib/python3.11/dataclasses.py:815: in _get_field
    raise ValueError(f'mutable default {type(f.default)} for field '
E   ValueError: mutable default <class 'tests.conftest.Point'> for field a is not allowed: use default_factory
@benallard benallard linked a pull request May 4, 2023 that will close this issue
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 a pull request may close this issue.

1 participant