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

Fix crash on newer pythons #1499

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

andrew-vant
Copy link

@andrew-vant andrew-vant commented Feb 18, 2025

distutils was removed in python 3.12, causing the import of
find_executable to fail. According to the python devs, find_executable
was never intended as an external interface to begin with (see python
issue #392601). This replaces find_executable with shutil.which,
which is available on all pythons supported by thefuck.

Four tox tests fail, but they are not related to this change (and they
failed in the previous version too).

I notice a few other PRs for the same issue; is thefuck still maintained?

Footnotes

  1. https://bugs.python.org/issue39260#msg359644

distutils was removed in python 3.12, causing the import of
find_executable to fail.  According to the python devs, find_executable
was never intended as an external interface to begin with (see python
issue #39260[^1]). This replaces it with shutil.which.

[^1]: https://bugs.python.org/issue39260#msg359644
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.

1 participant