nvbn / thefuck

Magnificent app which corrects your previous console command.
MIT License
83.62k stars 3.41k forks source link

ModuleNotFoundError: No module named 'imp' (python 3.12.0) #1416

Closed wooposs closed 7 months ago

wooposs commented 7 months ago

Hi there,

after upgrading to Fedora 39, thefuck is not working anymore. After opening the terminal this error message is shown:

Traceback (most recent call last): File "/usr/local/bin/thefuck", line 5, in from thefuck.entrypoints.main import main File "/usr/lib/python3.12/site-packages/thefuck/entrypoints/main.py", line 8, in from .. import logs # noqa: E402 ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/thefuck/logs.py", line 8, in from .conf import settings File "/usr/lib/python3.12/site-packages/thefuck/conf.py", line 1, in from imp import load_source ModuleNotFoundError: No module named 'imp'

The output of thefuck --version (something like The Fuck 3.1 using Python 3.5.0 and Bash 4.4.12(1)-release):

N/A

Your system (Debian 7, ArchLinux, Windows, etc.):

Fedora 39, Python 3.12.0

How to reproduce the bug:

Open the terminal or try to run the 'fuck' command

The output of The Fuck with THEFUCK_DEBUG=true exported (typically execute export THEFUCK_DEBUG=true in your shell before The Fuck):

N/A

If the bug only appears with a specific application, the output of that application and its version:

N/A

Anything else you think is relevant:

N/A
manero6 commented 7 months ago

same on Fedora Rawhide aka Fedora 40.

Rom1deTroyes commented 7 months ago

See #1381 : Python 12 has removed the imp package.

wooposs commented 7 months ago

Sorry, my fault. Didn't see #1381 Many thanks