From b5b2fb57e163d9e853a8f30b56260e52e8d21c92 Mon Sep 17 00:00:00 2001 From: Kyle Lippincott Date: Wed, 11 Jan 2017 11:52:32 -0800 Subject: [PATCH] Disable sitecustomize when checking python version Sitecustomize files can be slow or broken and might hang editor startup. Since they aren't necessary for checking the python version, disable them to get a small speed boost for everyone, and an editor that doesn't hang indefinitely on startup if the sitecustomize gets into an infinite loop (due to a bad NFS mount or similar). --- python/ycm/paths.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/ycm/paths.py b/python/ycm/paths.py index 17edafa3..292a2a17 100644 --- a/python/ycm/paths.py +++ b/python/ycm/paths.py @@ -118,6 +118,9 @@ def IsPythonVersionCorrect( path ): return False command = [ path, + # Disable site customize. Faster, and less likely to encounter + # issues with disconnected mounts (nfs, fuse, etc.) + '-S', '-c', "import sys;" "major, minor = sys.version_info[ :2 ];"