Drop Python 2.6 and Python 3.3
This commit is contained in:
parent
d183f11fa7
commit
605ef42cd6
@ -54,7 +54,7 @@ jobs:
|
||||
- *run-tests
|
||||
- *upload-coverage
|
||||
environment:
|
||||
YCMD_PYTHON_VERSION: 3.3
|
||||
YCMD_PYTHON_VERSION: 3.4
|
||||
workflows:
|
||||
version: 2
|
||||
build:
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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: `''`
|
||||
|
||||
|
@ -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
|
||||
|
@ -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: "''"
|
||||
>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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'." )
|
||||
|
@ -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():
|
||||
|
Loading…
Reference in New Issue
Block a user