Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BLD: use more modern way to specify license metadata #31560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

rrricharrrd
Copy link
Contributor

@rrricharrrd rrricharrrd commented Jun 16, 2025

Reference Issues/PRs

Closes #30766

What does this implement/fix? Explain your changes.

Updates means of specifying LICENSE. See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license-and-license-files

Any other comments?

N/A

@betatim @glemaitre

Copy link

github-actions bot commented Jun 16, 2025

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: ac431ca. Link to the linter CI: here

@rrricharrrd
Copy link
Contributor Author

Looking at the failing CI test, I see at https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=77349&view=logs&jobId=85dc54f1-b746-54c6-aaa8-29d3ad6201c9&j=85dc54f1-b746-54c6-aaa8-29d3ad6201c9&t=5f5d7705-2bc0-5dba-fcc6-e1cf6a70293a

Starting: Select python version to run CI python scripts
==============================================================================
Task         : Use Python version
Description  : Use the specified version of Python from the tool cache, optionally adding it to the PATH
Version      : 0.248.1
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/tool/use-python-version
==============================================================================
Found tool in cache: Python 3.9.23 x64
Finishing: Select python version to run CI python scripts

but here https://scikit-learn.org/stable/install.html it says that 1.7 requires Python 3.10 or later

not sure if this is related to my CI issue though...

@betatim
Copy link
Member

betatim commented Jun 17, 2025

I think the python version reported in the step that you linked to is a red herring. In our CI we always (I think) setup a conda environment in which all the work is done. So the python version shown in the CI step is more like the "system Python", not what is actually used. For example for this job the conda environment is based on https://github.com/scikit-learn/scikit-learn/blob/main/build_tools/azure/pymin_conda_forge_openblas_min_dependencies_environment.yml which specifies python 3.10

I wonder if the explanation for why this job fails and the others dont is the version of meson-python (0.16 for the minimum deps job, 0.18 in pymin_conda_forge_openblas_ubuntu_2204). Have you tried locally with meson-python 0.16? And/or is there something about this "new" style of specifying metadata in the meson-python change log?

If we can confirm it is due to meson-python, I would then summon @lesteve to see if we can bump the version up or not.

@rrricharrrd
Copy link
Contributor Author

@betatim I've tried locally with different meson-python versions, and that seems to be the issue:

For 0.18.0, 0.17.1, installation succeeds; for 0.17.0, 0.16.0 it doesn't. Can't figure out from changelog a likely reason for why, though: https://mesonbuild.com/meson-python/changelog.html

Show-versions output:

System:
    python: 3.11.11 (main, Dec 10 2024, 14:15:35) [Clang 16.0.0 (clang-1600.0.26.4)]
executable: /Users/richard/.pyenv/versions/sklearn/bin/python
   machine: macOS-14.7.6-x86_64-i386-64bit

Python dependencies:
      sklearn: 1.8.dev0
          pip: 24.0
   setuptools: 65.5.0
        numpy: 1.26.4
        scipy: 1.15.3
       Cython: 3.1.2
       pandas: None
   matplotlib: None
       joblib: 1.5.1
threadpoolctl: 3.6.0

Built with OpenMP: True

threadpoolctl info:
       user_api: blas
   internal_api: openblas
    num_threads: 2
         prefix: libopenblas
       filepath: /Users/richard/.pyenv/versions/3.11.11/envs/sklearn/lib/python3.11/site-packages/numpy/.dylibs/libopenblas64_.0.dylib
        version: 0.3.23.dev
threading_layer: pthreads
   architecture: Haswell

       user_api: openmp
   internal_api: openmp
    num_threads: 4
         prefix: libomp
       filepath: /usr/local/Cellar/libomp/20.1.7/lib/libomp.dylib
        version: None

@betatim
Copy link
Member

betatim commented Jun 17, 2025

Let's go ahead and bump up the minimum version in

"meson-python": ("0.16.0", "build"),
then. I'd go for 0.17.1

After updating the minimum version in that file you'll have to regenerate the lockfiles with build_tools/update_environments_and_lock_files.py

Copy link
Member

@betatim betatim left a comment

Choose a reason for hiding this comment

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

LGTM.

I don't think we need a changelog entry for this

@betatim betatim added Quick Review For PRs that are quick to review Waiting for Second Reviewer First reviewer is done, need a second one! labels Jun 18, 2025
@adrinjalali adrinjalali merged commit ec1be32 into scikit-learn:main Jun 18, 2025
44 checks passed
@lesteve
Copy link
Member

lesteve commented Jun 19, 2025

This looks like this PR broke the wheel build, see #31590 (comment) for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Quick Review For PRs that are quick to review Waiting for Second Reviewer First reviewer is done, need a second one!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update project metadata to avoid using the deprecated way to declare the license.
4 participants