Skip to content

ImportError: cannot import name '_power_of_two' from 'enum' #39

Open
@zevaryx

Description

@zevaryx

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

  1. Install Python 3.10
  2. Run make html with enum_tools.autoenum installed

Actual result:

ImportError: cannot import name '_power_of_two' from 'enum'

Expected result:

Better enum autodocs

Reproduces how often:

Easily reproduced

Version

  • Operating System: Windows 11 22471.1000
  • Python: 3.10.0
  • enum_tools: 0.6.4

Installation source

PyPi

Other Additional Information:

A solution would be to replace enum_tools/custom_enums.py#L50 with the Python main branch implementation

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingstale

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions