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

Python 3.12 compatibility issue: No module named 'imp' #667

Closed
mzpqnxow opened this issue Jan 24, 2024 · 4 comments
Closed

Python 3.12 compatibility issue: No module named 'imp' #667

mzpqnxow opened this issue Jan 24, 2024 · 4 comments

Comments

@mzpqnxow
Copy link

Python 3 deprecated imp and as of 3.12 (possibly earlier) it's removed

8:22:48 › ~/.local/bin/binwalk -e 240
Traceback (most recent call last):
  File "/home/binwalk/.local/bin/binwalk", line 2, in <module>
    from binwalk.__main__ import main
  File "/home/binwalk/.local/lib/python3.12/site-packages/binwalk/__init__.py", line 3, in <module>
    from binwalk.core.module import Modules
  File "/home/binwalk/.local/lib/python3.12/site-packages/binwalk/core/module.py", line 18, in <module>
    import binwalk.core.plugin
  File "/home/binwalk/.local/lib/python3.12/site-packages/binwalk/core/plugin.py", line 4, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'

It's easy to fix, for those encountering this I'll send a PR

Python >= 3.11 or 3.12 have some significant performance enhancements so it's worthwhile addressing this in my opinion

mzpqnxow added a commit to mzpqnxow/binwalk that referenced this issue Jan 24, 2024
mzpqnxow added a commit to mzpqnxow/binwalk that referenced this issue Feb 1, 2024
@dvzrv
Copy link

dvzrv commented Feb 26, 2024

Hi! 👋

I'm currently investigating packages still using the imp module, which has been removed with Python 3.12, as we are about to upgrade to Python 3.12 on Arch Linux.

It would be great if #668 could be merged and released, as it would help us in upgrading! :)

stkw0 pushed a commit to OSPG/binwalk that referenced this issue Feb 28, 2024
@FroggMaster
Copy link

Currently encountering this issue myself, would love for this to be merged. :)

@ElDavoo
Copy link

ElDavoo commented Mar 21, 2024

Please merge, thank you

@mzpqnxow
Copy link
Author

Hi! 👋

I'm currently investigating packages still using the imp module, which has been removed with Python 3.12, as we are about to upgrade to Python 3.12 on Arch Linux.

It would be great if #668 could be merged and released, as it would help us in upgrading! :)

FYI, you should probably consider switching packages off of this repo and to the one that is referenced in this issue/PR

As I understand it, this repo is no longer maintained, the community fork has effectively taken its place

You could of course stick with this repo for whatever reason, but with the number of unmerged PRs- many being bugfixes- you may find yourself managing a list of patches from the fork anyway 😀

@devttys0 devttys0 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 23, 2024
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

5 participants