Skip to content

Replace additional use of which(1) with shutil.which() - #355

Merged
ekalinin merged 1 commit into
ekalinin:masterfrom
mgorny:more-which
Dec 20, 2025
Merged

ekalinin merged 1 commit into
ekalinin:masterfrom
mgorny:more-which

Conversation

@mgorny

@mgorny mgorny commented May 31, 2024

Copy link
Copy Markdown
Contributor

Replace the remaining use of external which(1) tool with shutil.which() from the standard Python library, finally removing the dependency on a third party package.

This is a followup to 1024f4f.

Replace the remaining use of external `which(1)` tool with
`shutil.which()` from the standard Python library, finally removing
the dependency on a third party package.

This is a followup to 1024f4f.
@ekalinin

Copy link
Copy Markdown
Owner

Hey! Thanks for the patch!
Could you, please, add some test?

@mgorny

mgorny commented Aug 25, 2024

Copy link
Copy Markdown
Contributor Author

What kind of test?

@ekalinin

Copy link
Copy Markdown
Owner

Unit test.

@mgorny

mgorny commented Aug 25, 2024

Copy link
Copy Markdown
Contributor Author

install_activate is already covered by tests. I fail to see what I could test differently there.

@ssbarnea ssbarnea left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is indeed a very good fix, which is not installed by default on all platforms and native python implementation is well tested. Not an uncommon mistake to see in python projects.

@ekalinin
ekalinin merged commit e868dbe into ekalinin:master Dec 20, 2025
@ekalinin

Copy link
Copy Markdown
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants