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

Skip to content

MNT Remove unused extra_requires from pyproject.toml - #34544

Merged
lesteve merged 1 commit into
scikit-learn:mainfrom
cakedev0:remove_extra_deps
Jul 27, 2026
Merged

MNT Remove unused extra_requires from pyproject.toml#34544
lesteve merged 1 commit into
scikit-learn:mainfrom
cakedev0:remove_extra_deps

Conversation

@cakedev0

@cakedev0 cakedev0 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Closes #34537

What does this implement/fix? Explain your changes.

Removes the [project.optional-dependencies] extras (build, install, benchmark, docs, examples, tests, maintenance) from pyproject.toml. See why in the issue.

Also:

  • Removed the tag_to_packages inverse mapping in sklearn/_min_dependencies.py. It was already dead code since setup.py's extras_require (its only consumer) was removed in BLD Remove support for setuptools build #29400.
  • Renamed sklearn/tests/test_min_dependencies_readme.py -> test_min_dependencies_consistency.py because it tests consistency of sklearn/_min_dependencies.py against the doc and the pyproject.toml.
  • Updated it to drop checks on the now-removed project.optional-dependencies.* sections

AI usage disclosure

I used AI assistance for:

  • Code generation
  • Test generation
  • Research and understanding

Follow-up question

Tags in dependent_packages are now used this way:

  • build & install tags to cross-check pyproject.toml
  • others tags are only used to render the minimum-dependency table in the docs. For me the table it generates s a bit confusing for end-users. It's more contributor oriented but it's in the installing-the-latest-release section... Maybe we could revisit that?

@lesteve lesteve left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for this clean-up PR! Let's merge this one since @thomasjpfan agreed that it was fine to remove the extra_requires.

Full disclosure: I don't think this is worth a changelog entry, because nobody seems to use the extra_requires according to the GitHub search in #34537. If someone strongly disagrees, PR more than welcome 😉!

@lesteve

lesteve commented Jul 27, 2026

Copy link
Copy Markdown
Member

For me the table it generates is a bit confusing for end-users. It's more contributor oriented but it's in the installing-the-latest-release section... Maybe we could revisit that?

I agree that the table is a bit confusing in this part of the doc which is more for users so listing build dependencies does not make too much sense ...

Maybe the table in the user-facing doc would only show install and examples tags? And then somewhere else in the contributor doc, we would have a table with the full dependency list?

Having said this, I don't think this is very high at the top of our priority list 😅.

@lesteve
lesteve merged commit 17d3b59 into scikit-learn:main Jul 27, 2026
46 of 47 checks passed
prady0t pushed a commit to prady0t/scikit-learn that referenced this pull request Sep 2, 2026
@jeremiedbb jeremiedbb mentioned this pull request Sep 8, 2026
14 tasks
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Sep 8, 2026
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Sep 9, 2026
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFC Remove possibly unused extra_requires i.e. pip install scikit-learn[your_thing_goes_here]

2 participants