diff --git a/.circleci/config.yml b/.circleci/config.yml index 79c40820..0b0f7738 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -54,7 +54,7 @@ jobs: - *run-tests - *upload-coverage environment: - YCMD_PYTHON_VERSION: 3.4 + YCMD_PYTHON_VERSION: 3.5 workflows: version: 2 build: diff --git a/.circleci/install_dependencies.sh b/.circleci/install_dependencies.sh index dff4b02c..1b65d183 100755 --- a/.circleci/install_dependencies.sh +++ b/.circleci/install_dependencies.sh @@ -50,7 +50,7 @@ if [ "${YCMD_PYTHON_VERSION}" == "2.7" ]; then # -lSystemStubs" PYENV_VERSION="2.7.2" else - PYENV_VERSION="3.4.0" + PYENV_VERSION="3.5.1" fi # In order to work with ycmd, python *must* be built as a shared library. The diff --git a/.travis.yml b/.travis.yml index f1c2d4ea..6293b547 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ env: - COVERAGE=true matrix: - YCM_PYTHON_VERSION=2.7 - - YCM_PYTHON_VERSION=3.4 + - YCM_PYTHON_VERSION=3.5 addons: apt: sources: diff --git a/ci/travis/travis_install.sh b/ci/travis/travis_install.sh index fc93e414..66244a25 100644 --- a/ci/travis/travis_install.sh +++ b/ci/travis/travis_install.sh @@ -45,7 +45,7 @@ if [ "${YCM_PYTHON_VERSION}" == "2.7" ]; then # "TypeError: argument can't be " PYENV_VERSION="2.7.1" else - PYENV_VERSION="3.4.0" + PYENV_VERSION="3.5.1" fi # In order to work with ycmd, python *must* be built as a shared library. This diff --git a/install.py b/install.py index 96d3bda3..303faf3d 100755 --- a/install.py +++ b/install.py @@ -11,11 +11,9 @@ import sys import os.path as p import glob -PY_MAJOR, PY_MINOR, PY_PATCH = sys.version_info[ 0 : 3 ] -if not ( ( PY_MAJOR == 2 and PY_MINOR == 7 and PY_PATCH >= 1 ) or - ( PY_MAJOR == 3 and PY_MINOR >= 4 ) or - PY_MAJOR > 3 ): - sys.exit( 'YouCompleteMe requires Python >= 2.7.1 or >= 3.4; ' +version = sys.version_info[ 0 : 3 ] +if version < ( 2, 7, 1 ) or ( 3, 0, 0 ) <= version < ( 3, 5, 1 ): + sys.exit( 'YouCompleteMe requires Python >= 2.7.1 or >= 3.5.1; ' 'your version of Python is ' + sys.version ) DIR_OF_THIS_SCRIPT = p.dirname( p.abspath( __file__ ) ) diff --git a/plugin/youcompleteme.vim b/plugin/youcompleteme.vim index 1eae5f5a..38426df7 100644 --- a/plugin/youcompleteme.vim +++ b/plugin/youcompleteme.vim @@ -58,7 +58,7 @@ elseif ( v:version > 800 || ( v:version == 800 && has( 'patch1436' ) ) ) && \ !has( 'python_compiled' ) && !has( 'python3_compiled' ) echohl WarningMsg | \ echomsg "YouCompleteMe unavailable: requires Vim compiled with " . - \ "Python (2.7.1+ or 3.4+) support." | + \ "Python (2.7.1+ or 3.5.1+) support." | \ echohl None call s:restore_cpo() finish diff --git a/python/ycm/paths.py b/python/ycm/paths.py index a135e3a6..013a66e3 100644 --- a/python/ycm/paths.py +++ b/python/ycm/paths.py @@ -33,7 +33,7 @@ DIR_OF_YCMD = os.path.join( DIR_OF_CURRENT_SCRIPT, '..', '..', 'third_party', 'ycmd' ) WIN_PYTHON_PATH = os.path.join( sys.exec_prefix, 'python.exe' ) PYTHON_BINARY_REGEX = re.compile( - r'python((2(\.[67])?)|(3(\.[3-9])?))?(.exe)?$', re.IGNORECASE ) + r'python((2(\.7)?)|(3(\.[5-9])?))?(.exe)?$', re.IGNORECASE ) # Not caching the result of this function; users shouldn't have to restart Vim @@ -51,7 +51,7 @@ def PathToPythonInterpreter(): return python_interpreter raise RuntimeError( "Path in 'g:ycm_server_python_interpreter' option " - "does not point to a valid Python 2.7 or 3.4+." ) + "does not point to a valid Python 2.7 or 3.5+." ) python_interpreter = _PathToPythonUsedDuringBuild() if python_interpreter and utils.GetExecutable( python_interpreter ): @@ -77,7 +77,7 @@ def PathToPythonInterpreter(): if python_interpreter: return python_interpreter - raise RuntimeError( "Cannot find Python 2.7 or 3.4+. " + raise RuntimeError( "Cannot find Python 2.7 or 3.5+. " "Set the 'g:ycm_server_python_interpreter' option " "to a Python interpreter path." ) @@ -94,7 +94,7 @@ def _PathToPythonUsedDuringBuild(): def _EndsWithPython( path ): - """Check if given path ends with a python 2.7 or 3.4+ name.""" + """Check if given path ends with a python 2.7 or 3.5+ name.""" return path and PYTHON_BINARY_REGEX.search( path ) is not None diff --git a/python/ycm/tests/paths_test.py b/python/ycm/tests/paths_test.py index 34967f4f..1bd4390e 100644 --- a/python/ycm/tests/paths_test.py +++ b/python/ycm/tests/paths_test.py @@ -56,9 +56,9 @@ def EndsWithPython_Python2Paths_test(): def EndsWithPython_Python3Paths_test(): python_paths = [ 'python3', - '/usr/bin/python3.4', - '/home/user/.pyenv/shims/python3.4', - r'C:\Python34\python.exe' + '/usr/bin/python3.5', + '/home/user/.pyenv/shims/python3.5', + r'C:\Python35\python.exe' ] for path in python_paths: diff --git a/python/ycm/tests/youcompleteme_test.py b/python/ycm/tests/youcompleteme_test.py index bef0c3f3..7bab4f34 100644 --- a/python/ycm/tests/youcompleteme_test.py +++ b/python/ycm/tests/youcompleteme_test.py @@ -73,7 +73,7 @@ def YouCompleteMe_InvalidPythonInterpreterPath_test( post_vim_message ): post_vim_message.assert_called_once_with( "Unable to start the ycmd server. " "Path in 'g:ycm_server_python_interpreter' option does not point " - "to a valid Python 2.7 or 3.4+. " + "to a valid Python 2.7 or 3.5+. " "Correct the error then restart the server with ':YcmRestartServer'." ) post_vim_message.reset_mock() @@ -100,7 +100,7 @@ def YouCompleteMe_NoPythonInterpreterFound_test( post_vim_message, *args ): assert_that( ycm.IsServerAlive(), equal_to( False ) ) post_vim_message.assert_called_once_with( - "Unable to start the ycmd server. Cannot find Python 2.7 or 3.4+. " + "Unable to start the ycmd server. Cannot find Python 2.7 or 3.5+. " "Set the 'g:ycm_server_python_interpreter' option to a Python " "interpreter path. " "Correct the error then restart the server with ':YcmRestartServer'." )