Warn users about shadowed entrypoint scripts on installation #7228
Labels
C: scripts
How scripts and entry points are managed
state: awaiting PR
Feature discussed, PR is needed
type: feature request
Request for a new feature
As mentioned by @pradyunsg in #7209 (comment).
What's the problem this feature will solve?
When installing a package using
--user
with entrypoints/scripts that shadow another executable, there can be problems if that executable is onPATH
before the new executable. This is especially true for Python scripts when something changes about the actual function that gets imported (like movingpip._internal:main
topip._internal.main:main
).This is one of the causes behind #5599.
Describe the solution you'd like
On installation of a package, identify the executables that were created for scripts/entrypoints. For each executable, determine if it is the executable that would be found given a normal invocation of the name (or basename, for scripts that end with something in
PATHEXT
). If not, then trace a warning to the user likeAlternative Solutions
Additional context
The text was updated successfully, but these errors were encountered: