Repository navigation
Conversation
`_safe_indexing` stays importable from `sklearn.utils` as a plain alias, without a warning. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
cakedev0
marked this pull request as draft
November 2, 2026 12:17
cakedev0
marked this pull request as ready for review
November 2, 2026 12:30
lorentzenchr
reviewed
Nov 2, 2026
lorentzenchr
left a comment
Member
There was a problem hiding this comment.
I would make it clear that either _safe_indexing is removed in a future version or at least that it might be removed. Otherwise, we carry on having a semi-public-private function that we deal with as if 100% public. That was never the intention and never communicated.
cakedev0
added a commit
to cakedev0/my-scikit-learn-backlog
that referenced
this pull request
Nov 2, 2026
add: Maintenance: get [sklearn#35295](scikit-learn/scikit-learn#35295) reviewed (make `_safe_indexing` public as `safe_indexing`) Co-Authored-By: Claude Opus 5.5 <[email protected]>
cakedev0
added a commit
to cakedev0/my-scikit-learn-backlog
that referenced
this pull request
Nov 2, 2026
todo: move [sklearn#35295](scikit-learn/scikit-learn#35295) from Waiting to Now: address lorentzenchr's review on removing the `_safe_indexing` alias add: Maintenance: re-review [sklearn#35261](scikit-learn/scikit-learn#35261) (1.10 deprecations in MDS; FrancoisPgm addressed my comments) todo: betatim's fixes on [sklearn#35053](scikit-learn/scikit-learn#35053), ogrisel asking jjerphan to review [sklearn#34935](scikit-learn/scikit-learn#34935) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
Author
|
Yeah we should totally add I chose 1.14 for deprecation and 1.15 for removal. |
cakedev0
added a commit
to cakedev0/my-scikit-learn-backlog
that referenced
this pull request
Nov 3, 2026
todo: move [sklearn#35295](scikit-learn/scikit-learn#35295) from Now to Waiting, lorentzenchr's review addressed todo: [fork#40](cakedev0/scikit-learn#40) is the fix for the red CI of [sklearn#34339](scikit-learn/scikit-learn#34339), waiting on lorentzenchr Co-Authored-By: Claude Opus 5.5 <[email protected]>
lorentzenchr
approved these changes
Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
Fixes #27439. Follow-up of the discussion in #32728:
_safe_indexingis used by 21 of the ~70 scikit-learn based libraries I surveyed (comment), so we agreed to make it public.What does this implement/fix? Explain your changes.
_safe_indexingtosafe_indexingand remove the "documented, but private" warning from its docstring._safe_indexingas a plain alias (_safe_indexing = safe_indexing), importable fromsklearn.utilsas before, without a deprecation warning.safe_indexinginstead of_safe_indexingin the API reference, and redirect the old API page to the new one (it is linked from the docs of downstream libraries).safe_indexing(34 files, a pure rename).Why no deprecation for now: most users who would see the warning can't do anything about it, since the call is inside imbalanced-learn, MAPIE, skrub, etc. I propose the following plan:
safe_indexingwith the_safe_indexingalias for a few releases,sklearn-compat),_safe_indexing,AI usage disclosure
I used AI assistance for: