Make VIRTUAL_ENV not end with "/" as same as normal virtualenv activation#73
Open
flying-foozy wants to merge 1 commit intoporterjamesj:masterfrom
Open
Make VIRTUAL_ENV not end with "/" as same as normal virtualenv activation#73flying-foozy wants to merge 1 commit intoporterjamesj:masterfrom
flying-foozy wants to merge 1 commit intoporterjamesj:masterfrom
Conversation
…tion If a virtualenv is normally activated, environment variable VIRTUAL_ENV does not end with "/", and its value is equal to sys.prefix in the python process. On the other hand, virtualenvwrapper.el before this commit makes VIRTUAL_ENV end with "/". Therefore, its value is different from sys.prefix in the python process spawned from Emacs. VIRTUAL_ENV ending with "/" might cause issues. For example, Jedi https://github.com/davidhalter/jedi stops working, in such case. Jedi creates PIPE-ed child process at each completion requests or so, and keeps them opened, if VIRTUAL_ENV is not equal to sys.prefix in child process. Finally, it stops working soon, because of EMFILE ("Too many open files"). Though child process management of Jedi may have to be more efficient, virtualenvwrapper.el also have to make VIRTUAL_ENV not end with "/", IMHO, because normal virtualenv activation does so, and the format of environment variable is a kind of API for inter process co-operation. According to commit f7c97e2 ("ensure venv-location has slash on end") for issue porterjamesj#51, there are some code paths, which expect venv-current-dir to end with "/". Therefore, this commit eliminates tail "/" of venv-current-dir at each assigning non-nil value to VIRTUAL_ENV, instead of making venv-current-dir not end with "/".
3c67b10 to
6e61c08
Compare
Author
|
Oops, I overlooked behinding from recent master head, sorry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit improves compatibility of
VIRTUAL_ENVvalue against normal virtualenv activation.