Skip to content

Twofish Library Fails to Import in Python 3.12 Due to Removed imp Module #131286

@Numeratus

Description

@Numeratus

Good afternoon, I am trying to use the library twofish on my project but it is currently not possible due to a missing module.

It fails to import in Python 3.12 due to its dependency on the imp module, which was removed some versions ago.

Steps to Reproduce:

    Install Python 3.12
    Install twofish: pip install twofish
    Attempt to import: from twofish import Twofish

Actual Behavior:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/path/to/twofish.py", line 11, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'

Can anyone propose a solution?

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions