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

thefuck: move setuptools to depends #53393

Closed
wants to merge 1 commit into from

Conversation

Trickyni-V56
Copy link

Testing the changes

  • I tested the changes in this PR: NO

@abenson
Copy link
Contributor

abenson commented Dec 9, 2024

What's the reasoning?

srcpkgs/thefuck/template Outdated Show resolved Hide resolved
@Trickyni-V56
Copy link
Author

Without python3-setuptools installed, I'm getting this error:

  File "/usr/bin/thefuck", line 9, in <module>
    from thefuck.entrypoints.main import main
  File "/usr/lib/python3.12/site-packages/thefuck/entrypoints/main.py", line 2, in <module>
    from ..system import init_output
  File "/usr/lib/python3.12/site-packages/thefuck/system/__init__.py", line 7, in <module>
    from .unix import *  # noqa: F401,F403
    ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/thefuck/system/unix.py", line 6, in <module>
    from distutils.spawn import find_executable
ModuleNotFoundError: No module named 'distutils'

After reinstalling python3-setuptools thefuck works properly.

@tranzystorekk
Copy link
Contributor

tranzystorekk commented Dec 12, 2024

setuptools does bring back the distutils module, but as mentioned in nvbn/thefuck#1473, the correct fix is instead to replace distutils.spawn.find_executable with shutil.which

@tranzystorekk
Copy link
Contributor

As upstream has gone unmaintained, I'd be extremely wary of taking on the task of backporting fixes to the ever-growing list of issues. Maybe we should revisit the topic once there is an acknowledged maintained fork.

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 this pull request may close these issues.

3 participants