Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Add support for Python 3.10 #188

Merged
merged 15 commits into from
Jan 9, 2022
6 changes: 5 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
python_arch:
- x64
include:
Expand All @@ -42,6 +43,9 @@ jobs:
- os: windows-latest
python_version: '3.9'
python_arch: x86
- os: windows-latest
python_version: '3.10'
python_arch: x86
container: ${{ matrix.os == 'ubuntu-latest' && 'quay.io/pypa/manylinux2014_x86_64' || '' }}
steps:
- name: Checkout repository
Expand Down Expand Up @@ -107,7 +111,7 @@ jobs:
- name: Run tests
run: pytest -v --pyargs lightning
- name: Create archive with sources
if: matrix.os == 'ubuntu-latest' && matrix.python_version == '3.9' && startsWith(github.ref, 'refs/tags/')
if: matrix.os == 'ubuntu-latest' && matrix.python_version == '3.10' && startsWith(github.ref, 'refs/tags/')
run: python setup.py sdist
- name: Create wheels
if: startsWith(github.ref, 'refs/tags/')
Expand Down
1 change: 1 addition & 0 deletions requirements_build.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
cython
setuptools<50.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that < is probably not a good idea.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, looks it's unavoidable if you'd like to build scikit-learn from sources, unfortunately: numpy/numpy#20640 (comment).

By the way, y'all really should pin setuptools in your release branches. This is not done currently (https://github.com/scikit-learn/scikit-learn/blob/1.0.X/pyproject.toml#L4), and hence the breakage you're seeing in your CI will also occur when installing from an sdist with pip install scikit-learn.

Anyway, we are going to have a big refactoring of the package building routine with Python 3.12 release according to scikit-learn/scikit-learn#21499.

numpy