Drop python 3.4
This commit is contained in:
parent
299f8e48e7
commit
54f5a9b1c1
@ -54,7 +54,7 @@ jobs:
|
||||
- *run-tests
|
||||
- *upload-coverage
|
||||
environment:
|
||||
YCMD_PYTHON_VERSION: 3.4
|
||||
YCMD_PYTHON_VERSION: 3.5
|
||||
workflows:
|
||||
version: 2
|
||||
build:
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -45,7 +45,7 @@ if [ "${YCM_PYTHON_VERSION}" == "2.7" ]; then
|
||||
# "TypeError: argument can't be <type 'unicode'>"
|
||||
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
|
||||
|
@ -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__ ) )
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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'." )
|
||||
|
Loading…
Reference in New Issue
Block a user