diff --git a/.circleci/config.yml b/.circleci/config.yml index 064c7036..808f8c42 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -54,7 +54,7 @@ jobs: - *run-tests - *upload-coverage environment: - YCMD_PYTHON_VERSION: 3.3 + YCMD_PYTHON_VERSION: 3.4 workflows: version: 2 build: diff --git a/.circleci/install_dependencies.sh b/.circleci/install_dependencies.sh index c25c2527..75172376 100755 --- a/.circleci/install_dependencies.sh +++ b/.circleci/install_dependencies.sh @@ -49,9 +49,9 @@ eval "$(pyenv init -)" if [ "${YCMD_PYTHON_VERSION}" == "2.7" ]; then # We need a recent enough version of Python 2.7 on macOS or an error occurs # when installing the psutil dependency for our tests. - PYENV_VERSION="2.7.8" + PYENV_VERSION="2.7.14" else - PYENV_VERSION="3.3.6" + PYENV_VERSION="3.4.7" 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 290e323b..d34749c6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,9 +14,8 @@ env: - YCM_CORES=3 - COVERAGE=true matrix: - - YCM_PYTHON_VERSION=2.6 - YCM_PYTHON_VERSION=2.7 - - YCM_PYTHON_VERSION=3.3 + - YCM_PYTHON_VERSION=3.4 addons: apt: sources: diff --git a/README.md b/README.md index 46f8a3f8..9744f6c2 100644 --- a/README.md +++ b/README.md @@ -2607,7 +2607,7 @@ let g:ycm_disable_for_files_larger_than_kb = 1000 This option specifies the Python interpreter to use to run the [jedi][] completion library. Specify the Python interpreter to use to get completions. By default the Python under which [ycmd][] runs is used ([ycmd][] runs on -Python 2.6, 2.7 or 3.3+). +Python 2.7 or 3.4+). Default: `''` diff --git a/ci/travis/travis_install.sh b/ci/travis/travis_install.sh index 2014c5ea..3283c3d2 100644 --- a/ci/travis/travis_install.sh +++ b/ci/travis/travis_install.sh @@ -33,19 +33,17 @@ if [ ! -d "${PYENV_ROOT}/.git" ]; then fi pushd ${PYENV_ROOT} git fetch --tags -git checkout v1.0.8 +git checkout v1.2.1 popd export PATH="${PYENV_ROOT}/bin:${PATH}" eval "$(pyenv init -)" -if [ "${YCM_PYTHON_VERSION}" == "2.6" ]; then - PYENV_VERSION="2.6.6" -elif [ "${YCM_PYTHON_VERSION}" == "2.7" ]; then - PYENV_VERSION="2.7.6" +if [ "${YCM_PYTHON_VERSION}" == "2.7" ]; then + PYENV_VERSION="2.7.14" else - PYENV_VERSION="3.3.6" + PYENV_VERSION="3.4.7" fi # In order to work with ycmd, python *must* be built as a shared library. This diff --git a/doc/youcompleteme.txt b/doc/youcompleteme.txt index 5e42e920..38fe7a2b 100644 --- a/doc/youcompleteme.txt +++ b/doc/youcompleteme.txt @@ -2848,7 +2848,7 @@ The *g:ycm_python_binary_path* option This option specifies the Python interpreter to use to run the jedi [12] completion library. Specify the Python interpreter to use to get completions. By default the Python under which ycmd [45] runs is used (ycmd [45] runs on -Python 2.6, 2.7 or 3.3+). +Python 2.7 or 3.4+). Default: "''" > diff --git a/plugin/youcompleteme.vim b/plugin/youcompleteme.vim index 434f2ef3..72c2c2c5 100644 --- a/plugin/youcompleteme.vim +++ b/plugin/youcompleteme.vim @@ -57,7 +57,7 @@ elseif !has( 'timers' ) elseif !has( 'python' ) && !has( 'python3' ) echohl WarningMsg | \ echomsg "YouCompleteMe unavailable: requires Vim compiled with " . - \ "Python (2.6+ or 3.3+) support." | + \ "Python (2.7 or 3.4+) support." | \ echohl None call s:restore_cpo() finish diff --git a/python/test_requirements.txt b/python/test_requirements.txt index 8961b2dc..82d6b670 100644 --- a/python/test_requirements.txt +++ b/python/test_requirements.txt @@ -1,6 +1,4 @@ -# Flake8 3.x dropped support of Python 2.6 and 3.3 -flake8 < 3.0.0; python_version == '2.6' or python_version == '3.3' -flake8 >= 3.0.0; python_version == '2.7' or python_version > '3.3' +flake8 >= 3.0.0 mock >= 1.0.1 nose >= 1.3.7 PyHamcrest >= 1.8.0 diff --git a/python/ycm/paths.py b/python/ycm/paths.py index 1b9009f6..a135e3a6 100644 --- a/python/ycm/paths.py +++ b/python/ycm/paths.py @@ -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.6+ or 3.3+." ) + "does not point to a valid Python 2.7 or 3.4+." ) 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.6+ or 3.3+. " + raise RuntimeError( "Cannot find Python 2.7 or 3.4+. " "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.6+ or 3.3+ name.""" + """Check if given path ends with a python 2.7 or 3.4+ 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 e50572bd..34967f4f 100644 --- a/python/ycm/tests/paths_test.py +++ b/python/ycm/tests/paths_test.py @@ -43,9 +43,9 @@ def EndsWithPython_Python2Paths_test(): python_paths = [ 'python', 'python2', - '/usr/bin/python2.6', + '/usr/bin/python2.7', '/home/user/.pyenv/shims/python2.7', - r'C:\Python26\python.exe', + r'C:\Python27\python.exe', '/Contents/MacOS/Python' ] @@ -56,9 +56,9 @@ def EndsWithPython_Python2Paths_test(): def EndsWithPython_Python3Paths_test(): python_paths = [ 'python3', - '/usr/bin/python3.3', - '/home/user/.pyenv/shims/python3.3', - r'C:\Python33\python.exe' + '/usr/bin/python3.4', + '/home/user/.pyenv/shims/python3.4', + r'C:\Python34\python.exe' ] for path in python_paths: diff --git a/python/ycm/tests/youcompleteme_test.py b/python/ycm/tests/youcompleteme_test.py index a908870b..9f80f488 100644 --- a/python/ycm/tests/youcompleteme_test.py +++ b/python/ycm/tests/youcompleteme_test.py @@ -55,7 +55,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.6+ or 3.3+. " + "to a valid Python 2.7 or 3.4+. " "Correct the error then restart the server with ':YcmRestartServer'." ) post_vim_message.reset_mock() @@ -81,7 +81,7 @@ def YouCompleteMe_NoPythonInterpreterFound_test( post_vim_message, *args ): ycm = YouCompleteMe( MakeUserOptions() ) assert_that( ycm.IsServerAlive(), equal_to( False ) ) post_vim_message.assert_called_once_with( - "Unable to start the ycmd server. Cannot find Python 2.6+ or 3.3+. " + "Unable to start the ycmd server. Cannot find Python 2.7 or 3.4+. " "Set the 'g:ycm_server_python_interpreter' option to a Python " "interpreter path. " "Correct the error then restart the server with ':YcmRestartServer'." ) diff --git a/run_tests.py b/run_tests.py index d07f708b..618b6302 100755 --- a/run_tests.py +++ b/run_tests.py @@ -38,10 +38,7 @@ import argparse def RunFlake8(): print( 'Running flake8' ) subprocess.check_call( [ - sys.executable, - # __main__ is required on Python 2.6. - '-m', 'flake8.__main__', - p.join( DIR_OF_THIS_SCRIPT, 'python' ) + sys.executable, '-m', 'flake8', p.join( DIR_OF_THIS_SCRIPT, 'python' ) ] ) @@ -86,9 +83,7 @@ def NoseTests( parsed_args, extra_nosetests_args ): else: nosetests_args.append( p.join( DIR_OF_THIS_SCRIPT, 'python' ) ) - subprocess.check_call( [ sys.executable, - # __main__ is required on Python 2.6. - '-m', 'nose.__main__' ] + nosetests_args ) + subprocess.check_call( [ sys.executable, '-m', 'nose' ] + nosetests_args ) def Main():