-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
No failure or warning for home_dir paths which break fragile shebang parsing #1039
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Just add a comment if you want to keep it open. Thank you for your contributions. |
This issue asks for a warning message as a workaround while we wait for a fix to the underlying problem. #53 tracks the fix to the underlying problem. According to #53 (comment), "It appears this bug is fixed by pip 10.0.0, released 2018-04-14." So, I think it's fine for this issue to be closed as "won't fix" also. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Just add a comment if you want to keep it open. Thank you for your contributions. |
This has been fixed on our rewrite branch, with #1366 now in full swing. |
Virtualenv uses shebang parsing of the home_dir path. That is, it creates files (e.g.
bin/pip
) which begin with:The
#!
is known as a shebang. The path after the shebang is parsed by the kernel on Linux and Mac OS X (though not on Windows). This kernel parsing is fragile: it can't tolerateAll those issues propose various fixes. Some of the fixes involve proposing changes upstream to distutil or pip. The upstream teams are resisting some changes because they are OS-specific or fragile. It is taking time to work that out.
In the meantime I think virtualenv should check the home_dir path for any of these flaws. On Mac OS and Linux, it should fail with an error if a path has any of these problems. Maybe there should be a way to override the error if a user explicitly asks to.
This issue is for the adding of a warning message to virtualenv, to reduce the impact of fragile shebang parsing until the above underlying issues are fixed, somehow.
It seems to me that adding this warning message should be a logically simple fix to
virtualenv/virtualenv.py
. Around line 685:688, next to the check foros.path.exists(home_dir)
, add a similar check foris_valid(home_dir)
. Functionis_valid()
checks for all the fragilities exposed by the above issues.The warning message could alternatively be a fatal error message. If so, then having an option like
-f
to override the error might also be a good addition.The text was updated successfully, but these errors were encountered: