Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
69b5bd31
Unverified
Commit
69b5bd31
authored
May 27, 2024
by
James Lamb
Committed by
GitHub
May 27, 2024
Browse files
[python-package] drop Python 3.6 support, add Python 3.12 (#6459)
parent
7d152984
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
88 additions
and
32 deletions
+88
-32
.ci/conda-envs/ci-core-py38.txt
.ci/conda-envs/ci-core-py38.txt
+51
-0
.ci/test-python-oldest.sh
.ci/test-python-oldest.sh
+7
-6
.ci/test.sh
.ci/test.sh
+2
-0
.ci/test_windows.ps1
.ci/test_windows.ps1
+2
-0
.github/workflows/cuda.yml
.github/workflows/cuda.yml
+3
-3
.github/workflows/linkchecker.yml
.github/workflows/linkchecker.yml
+1
-1
.github/workflows/python_package.yml
.github/workflows/python_package.yml
+8
-8
.github/workflows/static_analysis.yml
.github/workflows/static_analysis.yml
+1
-1
.vsts-ci.yml
.vsts-ci.yml
+11
-11
python-package/pyproject.toml
python-package/pyproject.toml
+2
-2
No files found.
.ci/conda-envs/ci-core-py38.txt
0 → 100644
View file @
69b5bd31
# [description]
#
# Similar to ci-core.txt, but specific to Python 3.8.
#
# Unlike ci-core.txt, this includes a Python version and uses
# `=` and `<=` pins to make solves faster and prevent against
# issues like https://github.com/microsoft/LightGBM/pull/6370.
#
# [usage]
#
# conda create \
# --name test-env \
# --file ./.ci/conda-envs/ci-core-py38.txt
#
# python
python=3.8.*
# direct imports
cffi=1.15.*
dask=2023.5.*
distributed=2023.5.*
joblib=1.4.*
matplotlib-base=3.7.*
numpy=1.24.*
pandas=1.5.*
pyarrow-core=16.1.*
python-graphviz=0.20.*
scikit-learn=1.3.*
scipy=1.10.*
# testing-only dependencies
cloudpickle=3.0.*
pluggy=1.5.*
psutil=5.9.8
pytest=8.2.*
# other recursive dependencies, just
# pinned here to help speed up solves
bokeh=3.1.*
fsspec=2024.5.*
msgpack-python=1.0.*
pluggy=1.5.*
pytz=2024.1
setuptools=69.5.*
snappy=1.2.*
tomli=2.0.*
tornado=6.4.*
wheel=0.43.*
zict=3.0.*
zipp=3.17.*
.ci/test-python-oldest.sh
View file @
69b5bd31
...
...
@@ -3,19 +3,20 @@
set
-e
-E
-u
-o
pipefail
# oldest versions of dependencies published after
# minimum supported Python version's first release
# minimum supported Python version's first release,
# for which there are wheels compatible with the
# python:{version} image
#
# see https://devguide.python.org/versions/
#
echo
"installing lightgbm's dependencies"
pip
install
\
'cffi==1.15.1'
\
'dataclasses'
\
'numpy==1.16.6'
\
'pandas==0.24.0'
\
'numpy==1.19.0'
\
'pandas==1.1.3'
\
'pyarrow==6.0.1'
\
'scikit-learn==0.
18.2
'
\
'scipy==
0.19
.0'
\
'scikit-learn==0.
24.0
'
\
'scipy==
1.6
.0'
\
||
exit
1
echo
"done installing lightgbm's dependencies"
...
...
.ci/test.sh
View file @
69b5bd31
...
...
@@ -132,6 +132,8 @@ fi
if
[[
$PYTHON_VERSION
==
"3.7"
]]
;
then
CONDA_REQUIREMENT_FILES
=
"--file
${
BUILD_DIRECTORY
}
/.ci/conda-envs/ci-core-py37.txt"
elif
[[
$PYTHON_VERSION
==
"3.8"
]]
;
then
CONDA_REQUIREMENT_FILES
=
"--file
${
BUILD_DIRECTORY
}
/.ci/conda-envs/ci-core-py38.txt"
else
CONDA_REQUIREMENT_FILES
=
"--file
${
BUILD_DIRECTORY
}
/.ci/conda-envs/ci-core.txt"
fi
...
...
.ci/test_windows.ps1
View file @
69b5bd31
...
...
@@ -55,6 +55,8 @@ conda update -q -y conda
if
(
$
env
:
PYTHON_VERSION
-eq
"3.7"
)
{
$
env
:
CONDA_REQUIREMENT_FILE
=
"
$
env
:
BUILD_SOURCESDIRECTORY
/.ci/conda-envs/ci-core-py37.txt"
}
elseif
(
$
env
:
PYTHON_VERSION
-eq
"3.8"
)
{
$
env
:
CONDA_REQUIREMENT_FILE
=
"
$
env
:
BUILD_SOURCESDIRECTORY
/.ci/conda-envs/ci-core-py38.txt"
}
else
{
$
env
:
CONDA_REQUIREMENT_FILE
=
"
$
env
:
BUILD_SOURCESDIRECTORY
/.ci/conda-envs/ci-core.txt"
}
...
...
.github/workflows/cuda.yml
View file @
69b5bd31
...
...
@@ -82,19 +82,19 @@ jobs:
include
:
-
method
:
wheel
compiler
:
gcc
python_version
:
"
3.1
1
"
python_version
:
"
3.1
0
"
cuda_version
:
"
11.8.0"
image
:
nvcr.io/nvidia/cuda:11.8.0-devel-ubuntu20.04
task
:
cuda
-
method
:
source
compiler
:
gcc
python_version
:
"
3.
9
"
python_version
:
"
3.
12
"
cuda_version
:
"
12.2.0"
image
:
nvcr.io/nvidia/cuda:12.2.0-devel-ubuntu22.04
task
:
cuda
-
method
:
pip
compiler
:
clang
python_version
:
"
3.1
0
"
python_version
:
"
3.1
1
"
cuda_version
:
"
11.8.0"
image
:
nvcr.io/nvidia/cuda:11.8.0-devel-ubuntu20.04
task
:
cuda
...
...
.github/workflows/linkchecker.yml
View file @
69b5bd31
...
...
@@ -10,7 +10,7 @@ on:
env
:
CONDA_ENV
:
test-env
OS_NAME
:
'
linux'
PYTHON_VERSION
:
'
3.1
1
'
PYTHON_VERSION
:
'
3.1
2
'
TASK
:
'
check-links'
jobs
:
...
...
.github/workflows/python_package.yml
View file @
69b5bd31
...
...
@@ -29,30 +29,30 @@ jobs:
include
:
-
os
:
macos-13
task
:
regular
python_version
:
'
3.
9
'
python_version
:
'
3.
10
'
-
os
:
macos-13
task
:
sdist
python_version
:
'
3.1
0
'
python_version
:
'
3.1
1
'
-
os
:
macos-13
task
:
bdist
python_version
:
'
3.
7
'
python_version
:
'
3.
8
'
-
os
:
macos-13
task
:
if-else
python_version
:
'
3.
9
'
python_version
:
'
3.
10
'
# We're currently skipping MPI jobs on macOS, see https://github.com/microsoft/LightGBM/pull/6425
# for further details.
# - os: macos-13
# task: mpi
# method: source
# python_version: '3.1
0
'
# python_version: '3.1
1
'
# - os: macos-13
# task: mpi
# method: pip
# python_version: '3.1
1
'
# python_version: '3.1
2
'
# - os: macos-13
# task: mpi
# method: wheel
# python_version: '3.
8
'
# python_version: '3.
9
'
steps
:
-
name
:
Checkout repository
uses
:
actions/checkout@v4
...
...
@@ -101,7 +101,7 @@ jobs:
--rm \
-v $(pwd):/opt/lgb-build \
-w /opt/lgb-build \
python:3.
6
\
python:3.
7
\
/bin/bash ./.ci/test-python-oldest.sh
all-python-package-jobs-successful
:
if
:
always()
...
...
.github/workflows/static_analysis.yml
View file @
69b5bd31
...
...
@@ -20,7 +20,7 @@ env:
COMPILER
:
'
gcc'
CONDA_ENV
:
test-env
OS_NAME
:
'
linux'
PYTHON_VERSION
:
'
3.1
1
'
PYTHON_VERSION
:
'
3.1
2
'
jobs
:
test
:
...
...
.vsts-ci.yml
View file @
69b5bd31
...
...
@@ -10,8 +10,8 @@ pr:
-
release/*
variables
:
AZURE
:
'
true'
PYTHON_VERSION
:
'
3.11'
CMAKE_BUILD_PARALLEL_LEVEL
:
4
PYTHON_VERSION
:
'
3.12'
CONDA_ENV
:
test-env
runCodesignValidationInjection
:
false
skipComponentGovernanceDetection
:
true
...
...
@@ -62,19 +62,19 @@ jobs:
matrix
:
regular
:
TASK
:
regular
PYTHON_VERSION
:
'
3.
9
'
PYTHON_VERSION
:
'
3.
10
'
sdist
:
TASK
:
sdist
PYTHON_VERSION
:
'
3.
7
'
PYTHON_VERSION
:
'
3.
8
'
bdist
:
TASK
:
bdist
PYTHON_VERSION
:
'
3.
8
'
PYTHON_VERSION
:
'
3.
9
'
inference
:
TASK
:
if-else
mpi_source
:
TASK
:
mpi
METHOD
:
source
PYTHON_VERSION
:
'
3.
8
'
PYTHON_VERSION
:
'
3.
9
'
gpu_source
:
TASK
:
gpu
METHOD
:
source
...
...
@@ -127,7 +127,7 @@ jobs:
TASK
:
sdist
bdist
:
TASK
:
bdist
PYTHON_VERSION
:
'
3.
9
'
PYTHON_VERSION
:
'
3.
10
'
inference
:
TASK
:
if-else
mpi_source
:
...
...
@@ -136,23 +136,23 @@ jobs:
mpi_pip
:
TASK
:
mpi
METHOD
:
pip
PYTHON_VERSION
:
'
3.1
0
'
PYTHON_VERSION
:
'
3.1
1
'
mpi_wheel
:
TASK
:
mpi
METHOD
:
wheel
PYTHON_VERSION
:
'
3.
8
'
PYTHON_VERSION
:
'
3.
9
'
gpu_source
:
TASK
:
gpu
METHOD
:
source
PYTHON_VERSION
:
'
3.1
0
'
PYTHON_VERSION
:
'
3.1
1
'
gpu_pip
:
TASK
:
gpu
METHOD
:
pip
PYTHON_VERSION
:
'
3.
9
'
PYTHON_VERSION
:
'
3.
10
'
gpu_wheel
:
TASK
:
gpu
METHOD
:
wheel
PYTHON_VERSION
:
'
3.
8
'
PYTHON_VERSION
:
'
3.
9
'
cpp_tests
:
TASK
:
cpp-tests
METHOD
:
with-sanitizers
...
...
python-package/pyproject.toml
View file @
69b5bd31
...
...
@@ -15,10 +15,10 @@ classifiers = [
"Programming Language :: Python :: 3.9"
,
"Programming Language :: Python :: 3.10"
,
"Programming Language :: Python :: 3.11"
,
"Programming Language :: Python :: 3.12"
,
"Topic :: Scientific/Engineering :: Artificial Intelligence"
]
dependencies
=
[
"dataclasses ; python_version < '3.7'"
,
"numpy"
,
"scipy"
]
...
...
@@ -29,7 +29,7 @@ maintainers = [
]
name
=
"lightgbm"
readme
=
"README.rst"
requires-python
=
">=3.
6
"
requires-python
=
">=3.
7
"
version
=
"4.3.0.99"
[project.optional-dependencies]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment