-
Notifications
You must be signed in to change notification settings - Fork 7
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
ImportError: cannot import name '_power_of_two' from 'enum' #39
Comments
Hi @zevaryx, sorry about that. The CPython developers decided postpone the changes to the 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. |
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
|
Can you upgrade to the latest enum-tools (0.12.0), or is there a conflict
with another dependency? 0.10.0 and 0.11.0 also have the fix for this
issue.
…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:
***@***.***>
|
Description
Adding
enum_tools.autoenum
to Sphinx on Python 3.10 causes the following error:ImportError: cannot import name '_power_of_two' from 'enum'
Steps to Reproduce
make html
withenum_tools.autoenum
installedActual result:
ImportError: cannot import name '_power_of_two' from 'enum'
Expected result:
Better enum autodocs
Reproduces how often:
Easily reproduced
Version
Installation source
PyPi
Other Additional Information:
A solution would be to replace enum_tools/custom_enums.py#L50 with the Python main branch implementation
The text was updated successfully, but these errors were encountered: