Skip to content

Commit

Permalink
[python] Start supporting Python 3.10 (#4893)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
StrikerRUS authored Feb 18, 2022
1 parent 717631a commit cb8c61e
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 26 deletions.
5 changes: 1 addition & 4 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linkchecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/python_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
24 changes: 14 additions & 10 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pr:
- master
variables:
AZURE: 'true'
PYTHON_VERSION: 3.9
PYTHON_VERSION: '3.10'
CONDA_ENV: test-env
resources:
containers:
Expand All @@ -35,17 +35,18 @@ jobs:
matrix:
regular:
TASK: regular
PYTHON_VERSION: '3.9'
sdist:
TASK: sdist
PYTHON_VERSION: 3.7
PYTHON_VERSION: '3.7'
bdist:
TASK: bdist
inference:
TASK: if-else
mpi_source:
TASK: mpi
METHOD: source
PYTHON_VERSION: 3.8
PYTHON_VERSION: '3.8'
gpu_source:
TASK: gpu
METHOD: source
Expand Down Expand Up @@ -94,7 +95,7 @@ jobs:
TASK: sdist
bdist:
TASK: bdist
PYTHON_VERSION: 3.8
PYTHON_VERSION: '3.8'
inference:
TASK: if-else
mpi_source:
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions python-package/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])

0 comments on commit cb8c61e

Please sign in to comment.