MAINT Move stuff outside of utils.__init__#26686
MAINT Move stuff outside of utils.__init__#26686jeremiedbb wants to merge 1 commit intoscikit-learn:mainfrom
Conversation
|
Even if the diff is big, it's just moving stuff around. I did not modify a single line of actual code 😄 |
|
This looks like a good thing to do and the structure/grouping is probably as good as it can be given that the starting point was this mixed bag of random stuff. One question: should we keep exposing things that used to be in |
|
|
Ah, looks like I could have figured that out from actually reading the diff ... I skipped it because it was so big :-/ |
adrinjalali
left a comment
There was a problem hiding this comment.
So what are the functions which don't start with _ but are now not available? We should double check those, otherwise LGTM.
|
Hi @jeremiedbb, is there something blocking this PR or is it ready to be reviewed? |
|
It would need to be sync with If the function starting with Since we always advocate to have a third-party developer section, I think this need to be done before to go in the documentation where can list which tools are actually useful for third-party libraries. |
|
Everything has been moved outside of |
Fixes #11633
utils.__init__contains a bunch of unrelated functions, some public, some private.This PR proposes to move them into dedicated submodules (creating
_indexing.py,_missing.py,_optional_dependencies.pyand_misc.py).Part of the motivation is to help developing
utilswithout having to work around circular imports, like what's happening in #26648 (comment)there are a few functions that I did not know where to put so I put them in a
_misc.pysubmodule. I still think it's better than having the wholeutils.__init__act as a big_miscmodule.