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

TypeError in python 3.13 #2065

Open
FFroehlich opened this issue Oct 22, 2024 · 3 comments
Open

TypeError in python 3.13 #2065

FFroehlich opened this issue Oct 22, 2024 · 3 comments

Comments

@FFroehlich
Copy link

The following import

from pint import UnitRegistry

fails under python 3.13 with error message

File ".../venv/lib/python3.13/site-packages/pint/__init__.py", line 18, in <module>
    from .delegates.formatter._format_helpers import formatter
  File ".../venv/lib/python3.13/site-packages/pint/delegates/__init__.py", line 12, in <module>
    from . import txt_defparser
  File ".../venv/lib/python3.13/site-packages/pint/delegates/txt_defparser/__init__.py", line 12, in <module>
    from .defparser import DefParser
  File ".../venv/lib/python3.13/site-packages/pint/delegates/txt_defparser/defparser.py", line 10, in <module>
    from . import block, common, context, defaults, group, plain, system
  File ".../venv/lib/python3.13/site-packages/pint/delegates/txt_defparser/common.py", line 23, in <module>
    @dataclass(frozen=True)
     ~~~~~~~~~^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.13.0_1/Frameworks/Python.framework/Versions/3.13/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 "/opt/homebrew/Cellar/[email protected]/3.13.0_1/Frameworks/Python.framework/Versions/3.13/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
@FFroehlich FFroehlich changed the title Incompatibility with python 3.13 TypeError in python 3.13 Oct 22, 2024
@hgrecco
Copy link
Owner

hgrecco commented Oct 22, 2024

I will be relasing a new version tomorrow

@nhoover
Copy link

nhoover commented Oct 23, 2024

Great, thanks for fixing. I'm having the same issue.

ken-lauer added a commit to ken-lauer/distgen-feedstock that referenced this issue Oct 23, 2024
We can't even import `pint` in 3.13 due to bug in pint
hgrecco/pint#2065 - which means we can't build
with it here.
@amit-chen-ecoplant
Copy link

Is the new version out yet?
I'm still getting the same error
E TypeError: cannot inherit frozen dataclass from a non-frozen one

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

No branches or pull requests

4 participants