Skip to content

Please support Python 3.14 #1567

@YanYLou

Description

@YanYLou

Background

As the Python 3.14 became more and more popular, it is significant to support 3.12+ which abandoned imp.
Many people have already found this. I'm adding my voice to emphasize its importance.

What went wrong?

The Error says,

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\RoseGold\AppData\Local\Programs\Python\Python314\Scripts\fuck.exe\__main__.py", line 2, in <module>
    from thefuck.entrypoints.not_configured import main
  File "C:\Users\RoseGold\AppData\Local\Programs\Python\Python314\Lib\site-packages\thefuck\entrypoints\not_configured.py", line 13, in <module>
    from .. import logs, const  # noqa: E402
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\RoseGold\AppData\Local\Programs\Python\Python314\Lib\site-packages\thefuck\logs.py", line 8, in <module>
    from .conf import settings
  File "C:\Users\RoseGold\AppData\Local\Programs\Python\Python314\Lib\site-packages\thefuck\conf.py", line 1, in <module>
    from imp import load_source
ModuleNotFoundError: No module named 'imp'

version:
Python 3.14.2
thefuck 3.32

The fix seems straightforward

Well, I have to acknowledge I don't know much about this. But AI told me that:
The imp module is deprecated and removed. Switching to importlib (e.g., importlib.machinery.SourceFileLoader) should resolve this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions