From 653e9f33a29773c2090274fa6c01c346686d5f57 Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Wed, 27 May 2020 00:57:08 -0700 Subject: [PATCH] Require Python 3.6+; drop Python 3.5 from CI --- Jenkinsfile | 1 - python-package/setup.py | 3 +-- python-package/xgboost/__init__.py | 6 ------ tests/ci_build/Dockerfile.cpu | 6 ------ tests/ci_build/test_python.sh | 8 +------- 5 files changed, 2 insertions(+), 22 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index dede061e9e51..744bba67913c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -305,7 +305,6 @@ def TestPythonCPU() { def docker_binary = "docker" sh """ ${dockerRun} ${container_type} ${docker_binary} tests/ci_build/test_python.sh cpu - ${dockerRun} ${container_type} ${docker_binary} tests/ci_build/test_python.sh cpu-py35 """ deleteDir() } diff --git a/python-package/setup.py b/python-package/setup.py index 0e135b22216a..857e78f5fbbf 100644 --- a/python-package/setup.py +++ b/python-package/setup.py @@ -309,11 +309,10 @@ def run(self): 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8'], - python_requires='>=3.5', + python_requires='>=3.6', url='https://github.com/dmlc/xgboost') clean_up() diff --git a/python-package/xgboost/__init__.py b/python-package/xgboost/__init__.py index f4724e9d91ec..c18030ec1d16 100644 --- a/python-package/xgboost/__init__.py +++ b/python-package/xgboost/__init__.py @@ -22,12 +22,6 @@ except ImportError: pass -if sys.version_info[:2] == (3, 5): - warnings.warn( - 'Python 3.5 support is deprecated; XGBoost will require Python 3.6+ in the near future. ' + - 'Consider upgrading to Python 3.6+.', - FutureWarning) - VERSION_FILE = os.path.join(os.path.dirname(__file__), 'VERSION') with open(VERSION_FILE) as f: __version__ = f.read().strip() diff --git a/tests/ci_build/Dockerfile.cpu b/tests/ci_build/Dockerfile.cpu index ad4464e3f4a4..7e18fd99006f 100644 --- a/tests/ci_build/Dockerfile.cpu +++ b/tests/ci_build/Dockerfile.cpu @@ -19,12 +19,6 @@ ENV PATH=/opt/python/bin:$PATH ENV GOSU_VERSION 1.10 -# Create new Conda environment with Python 3.5 -RUN conda create -n py35 python=3.5 && \ - source activate py35 && \ - pip install numpy pytest scipy scikit-learn pandas matplotlib wheel kubernetes urllib3 graphviz && \ - source deactivate - # Install Python packages in default env RUN \ pip install pyyaml cpplint pylint astroid sphinx numpy scipy pandas matplotlib sh \ diff --git a/tests/ci_build/test_python.sh b/tests/ci_build/test_python.sh index 78dc077c24f2..2730f51aafa3 100755 --- a/tests/ci_build/test_python.sh +++ b/tests/ci_build/test_python.sh @@ -65,14 +65,8 @@ case "$suite" in ./runtests.sh ;; - cpu-py35) - source activate py35 - install_xgboost - pytest -v -s --fulltrace tests/python - ;; - *) - echo "Usage: $0 {gpu|mgpu|cudf|cpu|cpu-py35}" + echo "Usage: $0 {gpu|mgpu|cudf|cpu}" exit 1 ;; esac