From cb8c61e4d3ac08b3d2c65c91bde483397f861cd3 Mon Sep 17 00:00:00 2001 From: Nikita Titov Date: Fri, 18 Feb 2022 03:36:41 +0300 Subject: [PATCH] [python] Start supporting Python 3.10 (#4893) * Update setup.py * Update cuda.yml * Update static_analysis.yml * Update linkchecker.yml * Update .appveyor.yml * Update .vsts-ci.yml * Update python_package.yml * Update .vsts-ci.yml * Update python_package.yml * Update cuda.yml * Update static_analysis.yml * Update linkchecker.yml * Update .vsts-ci.yml * Update .appveyor.yml * re-arange Python version --- .appveyor.yml | 5 +---- .github/workflows/cuda.yml | 6 +++--- .github/workflows/linkchecker.yml | 2 +- .github/workflows/python_package.yml | 14 +++++++------- .github/workflows/static_analysis.yml | 2 +- .vsts-ci.yml | 24 ++++++++++++++---------- python-package/setup.py | 1 + 7 files changed, 28 insertions(+), 26 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index c24d3d0b33f3..f4e6b1634345 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -27,10 +27,7 @@ install: - set PYTHON_VERSION=%CONFIGURATION% - set CONDA_ENV="test-env" - ps: | - switch ($env:PYTHON_VERSION) { - "3.7" {$env:MINICONDA = "C:\Miniconda37-x64"} - default {$env:MINICONDA = "C:\Miniconda37-x64"} - } + $env:MINICONDA = "C:\Miniconda3-x64" $env:PATH = "$env:MINICONDA;$env:MINICONDA\Scripts;$env:PATH" $env:BUILD_SOURCESDIRECTORY = "$env:APPVEYOR_BUILD_FOLDER" $env:LGB_VER = (Get-Content $env:APPVEYOR_BUILD_FOLDER\VERSION.txt).trim() diff --git a/.github/workflows/cuda.yml b/.github/workflows/cuda.yml index 52511e222db2..f90ce272deaa 100644 --- a/.github/workflows/cuda.yml +++ b/.github/workflows/cuda.yml @@ -25,15 +25,15 @@ jobs: include: - method: source compiler: gcc - python_version: 3.7 + python_version: "3.8" cuda_version: "11.5.1" - method: pip compiler: clang - python_version: 3.8 + python_version: "3.9" cuda_version: "10.0" - method: wheel compiler: gcc - python_version: 3.9 + python_version: "3.10" cuda_version: "9.0" steps: - name: Setup or update software on host machine diff --git a/.github/workflows/linkchecker.yml b/.github/workflows/linkchecker.yml index 53b4319fbdef..5867ed83f043 100644 --- a/.github/workflows/linkchecker.yml +++ b/.github/workflows/linkchecker.yml @@ -11,7 +11,7 @@ env: CONDA_ENV: test-env GITHUB_ACTIONS: 'true' OS_NAME: 'linux' - PYTHON_VERSION: 3.9 + PYTHON_VERSION: '3.10' TASK: 'check-links' jobs: diff --git a/.github/workflows/python_package.yml b/.github/workflows/python_package.yml index 8db4c68fc355..835578e87d1e 100644 --- a/.github/workflows/python_package.yml +++ b/.github/workflows/python_package.yml @@ -23,28 +23,28 @@ jobs: include: - os: macOS-latest task: regular - python_version: 3.8 + python_version: '3.8' - os: macOS-latest task: sdist - python_version: 3.9 + python_version: '3.9' - os: macOS-latest task: bdist - python_version: 3.8 + python_version: '3.7' - os: macOS-latest task: if-else - python_version: 3.8 + python_version: '3.8' - os: macOS-latest task: mpi method: source - python_version: 3.9 + python_version: '3.9' - os: macOS-latest task: mpi method: pip - python_version: 3.9 + python_version: '3.10' - os: macOS-latest task: mpi method: wheel - python_version: 3.7 + python_version: '3.7' steps: - name: Checkout repository uses: actions/checkout@v2.4.0 diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml index 1a9956a708f5..367e715145eb 100644 --- a/.github/workflows/static_analysis.yml +++ b/.github/workflows/static_analysis.yml @@ -15,7 +15,7 @@ env: CONDA_ENV: test-env GITHUB_ACTIONS: 'true' OS_NAME: 'linux' - PYTHON_VERSION: 3.9 + PYTHON_VERSION: '3.10' jobs: test: diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 5b53bfb90547..1f5981fdc8fc 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -9,7 +9,7 @@ pr: - master variables: AZURE: 'true' - PYTHON_VERSION: 3.9 + PYTHON_VERSION: '3.10' CONDA_ENV: test-env resources: containers: @@ -35,9 +35,10 @@ jobs: matrix: regular: TASK: regular + PYTHON_VERSION: '3.9' sdist: TASK: sdist - PYTHON_VERSION: 3.7 + PYTHON_VERSION: '3.7' bdist: TASK: bdist inference: @@ -45,7 +46,7 @@ jobs: mpi_source: TASK: mpi METHOD: source - PYTHON_VERSION: 3.8 + PYTHON_VERSION: '3.8' gpu_source: TASK: gpu METHOD: source @@ -94,7 +95,7 @@ jobs: TASK: sdist bdist: TASK: bdist - PYTHON_VERSION: 3.8 + PYTHON_VERSION: '3.8' inference: TASK: if-else mpi_source: @@ -103,21 +104,23 @@ jobs: mpi_pip: TASK: mpi METHOD: pip - PYTHON_VERSION: 3.8 + PYTHON_VERSION: '3.9' mpi_wheel: TASK: mpi METHOD: wheel - PYTHON_VERSION: 3.7 + PYTHON_VERSION: '3.7' gpu_source: TASK: gpu METHOD: source + PYTHON_VERSION: '3.9' gpu_pip: TASK: gpu METHOD: pip + PYTHON_VERSION: '3.8' gpu_wheel: TASK: gpu METHOD: wheel - PYTHON_VERSION: 3.7 + PYTHON_VERSION: '3.7' cpp_tests: TASK: cpp-tests METHOD: with-sanitizers @@ -223,10 +226,10 @@ jobs: matrix: regular: TASK: regular - PYTHON_VERSION: 3.7 + PYTHON_VERSION: '3.7' sdist: TASK: sdist - PYTHON_VERSION: 3.8 + PYTHON_VERSION: '3.8' bdist: TASK: bdist swig: @@ -263,9 +266,10 @@ jobs: matrix: regular: TASK: regular + PYTHON_VERSION: '3.9' sdist: TASK: sdist - PYTHON_VERSION: 3.8 + PYTHON_VERSION: '3.8' bdist: TASK: bdist swig: diff --git a/python-package/setup.py b/python-package/setup.py index ff6b296e27a7..6b39d8ef8f4e 100644 --- a/python-package/setup.py +++ b/python-package/setup.py @@ -380,4 +380,5 @@ def run(self) -> None: 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', 'Topic :: Scientific/Engineering :: Artificial Intelligence'])