hgrecco / pint

Operate and manipulate physical quantities in Python
http://pint.readthedocs.org/
Other
2.41k stars 472 forks source link

python 3.13 error #2061

Closed mpsheasby closed 1 month ago

mpsheasby commented 1 month ago

Hi, I get the following error when running pint in python 3.13.

I've not had the chance to confirm whether it is an issue with pint, but here is the error messages. Have pint tests been run with python 3.13?

Error Log

File "/usr/local/lib/python3.13/site-packages/pint/init.py", line 18, in from .delegates.formatter._format_helpers import formatter File "/usr/local/lib/python3.13/site-packages/pint/delegates/init.py", line 12, in from . import txt_defparser File "/usr/local/lib/python3.13/site-packages/pint/delegates/txt_defparser/init.py", line 12, in from .defparser import DefParser File "/usr/local/lib/python3.13/site-packages/pint/delegates/txt_defparser/defparser.py", line 10, in from . import block, common, context, defaults, group, plain, system File "/usr/local/lib/python3.13/site-packages/pint/delegates/txt_defparser/common.py", line 23, in @dataclass(frozen=True)


  File "/usr/local/lib/python3.13/dataclasses.py", line 1295, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
                          frozen, match_args, kw_only, slots,
                          weakref_slot)
  File "/usr/local/lib/python3.13/dataclasses.py", line 1043, in _process_class
    raise TypeError('cannot inherit frozen dataclass from a '
                    'non-frozen one')
TypeError: cannot inherit frozen dataclass from a non-frozen one
###
cpascual commented 1 month ago

I think this is a duplicate of #1969

mpsheasby commented 1 month ago

@cpascual thanks, well spotted