You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ImportError: cannot import name '_power_of_two' from 'enum' #39
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'm having the same issue with Python 3.12.4 and enum_tools@0.9.0-post1
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
OMITTED
File "/Users/arne/Developer/bahlo/xxx/.venv/lib/python3.12/site-packages/enum_tools/__init__.py", line 30, in <module>
from enum_tools.custom_enums import AutoNumberEnum, DuplicateFreeEnum, IntEnum, OrderedEnum, StrEnum
File "/Users/arne/Developer/bahlo/xxx.venv/lib/python3.12/site-packages/enum_tools/custom_enums.py", line 50, in <module>
from enum import _power_of_two
ImportError: cannot import name '_power_of_two' from 'enum' (/Users/arne/.local/share/mise/installs/python/3.12.4/lib/python3.12/enum.py)
How can I fix this? 0.9.0-post1 has the import, 0.9.0 doesn't have it. Needs a bump of enum-tools in the dependency.
On Wed, 31 Jul 2024, 09:07 Arne Bahlo, ***@***.***> wrote:
I'm having the same issue with Python 3.12.4 and ***@***.***
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
OMITTED
File "/Users/arne/Developer/bahlo/xxx/.venv/lib/python3.12/site-packages/enum_tools/__init__.py", line 30, in <module>
from enum_tools.custom_enums import AutoNumberEnum, DuplicateFreeEnum, IntEnum, OrderedEnum, StrEnum
File "/Users/arne/Developer/bahlo/xxx.venv/lib/python3.12/site-packages/enum_tools/custom_enums.py", line 50, in <module>
from enum import _power_of_two
ImportError: cannot import name '_power_of_two' from 'enum' (/Users/arne/.local/share/mise/installs/python/3.12.4/lib/python3.12/enum.py)
How can I fix this?
—
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5NRJOGQQQ5H2Z67HYRA2TZPCLMBAVCNFSM6AAAAABLX5M7FOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJZHEYTMOBTGQ>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
Activity
domdfcoding commentedon Dec 2, 2021
Hi @zevaryx, sorry about that. The CPython developers decided postpone the changes to the
enummodule until 3.11 which is what broke the import.It should be sorted in version 0.6.5. Can you try that version, and if it works for you I'll close the issue.
stale commentedon Jun 12, 2022
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
bahlo commentedon Jul 31, 2024
I'm having the same issue with Python 3.12.4 and enum_tools@0.9.0-post1
How can I fix this?0.9.0-post1 has the import, 0.9.0 doesn't have it. Needs a bump of enum-tools in the dependency.domdfcoding commentedon Jul 31, 2024