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

Not fully compatible with python 3.12.0 yet. #1418

Open
jdsjdk opened this issue Nov 22, 2023 · 2 comments · May be fixed by #1475
Open

Not fully compatible with python 3.12.0 yet. #1418

jdsjdk opened this issue Nov 22, 2023 · 2 comments · May be fixed by #1475

Comments

@jdsjdk
Copy link

jdsjdk commented Nov 22, 2023

When I first try running thefuck - I noticed that a deprecated python module is being used: imp. I can see that it has been replaced by importlib in the latest version.

I can tell that no one has reported this issue as of yet. Python 3.12.0 was just recently released.

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

I'll provide what I can. Since the latest version of thefuck is not working with 3.12, then I just get the same error:

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

but my shell version is the following:
fish, version 3.6.1
Oh My Fish version 7

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

CentOS 9 Stream.

How to reproduce the bug:

just type in thefuck or fuck and you should get that error once you install setuptools to fix the previous bug.

The output of The Fuck with THEFUCK_DEBUG=true exported (typically execute export THEFUCK_DEBUG=true in your shell before The Fuck):
that really didn't do anything or have any significant change.

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

@minhtrancccp
Copy link

minhtrancccp commented Nov 23, 2023

there's already a pr for this: #1415
as it seems to take a while before the pr is accepted, you can consider installing from there instead

@jaharkema
Copy link

There is indeed a PR (which is closed, because apparently a fix already exists in master), but since the latest release (3.32) of thefuck is of January 2022 (which indeed is over two years ago at the moment of writing), the fix has not been rolled out...

I guess the workaround is to install thefuck from source and update it manually every now and then?
Less then ideal imho.

@DJStompZone DJStompZone linked a pull request Oct 2, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants