Skip to content

MAINT Remove setuptools dependency from tests #29261

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

lesteve
Copy link
Member

@lesteve lesteve commented Jun 14, 2024

This is a follow-up from #29191 (comment) where the issue was noticed in the Python 3.13 free-threaded build.

On Python 3.12, venv and ensurepip have stopped installing setuptools by default, see https://docs.python.org/3.12/whatsnew/3.12.html#index-2

gh-95299: Do not pre-install setuptools in virtual environments created with venv. This means that distutils, setuptools, pkg_resources, and easy_install will no longer available by default; to access these run pip install setuptools in the activated virtual environment.

I guess one of the reason we have not noticed before is that for conda environments, conda create -n python does install setuptools.

Copy link

github-actions bot commented Jun 14, 2024

✔️ Linting Passed

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

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

@lesteve lesteve added No Changelog Needed Quick Review For PRs that are quick to review labels Jun 14, 2024
@lesteve
Copy link
Member Author

lesteve commented Jun 17, 2024

Setting this to "quick review", the changes to the code are minimal and the free_threaded CI (see build log) shows that the setuptools dependency has been removed.

Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

LGTM!

@adrinjalali adrinjalali merged commit 4cf0772 into scikit-learn:main Jun 17, 2024
38 of 41 checks passed
@jeremiedbb jeremiedbb mentioned this pull request Jul 2, 2024
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No Changelog Needed Quick Review For PRs that are quick to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants