-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Make externals private? #11182
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
Comments
I was just wondering: what should be done for the cases where the docs refer to the externals, such as when we talk about model persistence? #12171 reminded me of this. Should there be public methods in |
That is what we are now doing with joblib: sklearn.utils.Memory etc.
|
I agree with the idea of making externals private, but we tried to rename from sklearn.externals.some_module import something work (with a deprecation warning) without In practice, The question is how to remove joblib and six,
|
Doing module level deprecation of both six and joblib (when the unvendoring
is done) sounds simple enough. We could even do the deprecation in
externals/__init__.py and move the others to _externals
…On Sat, 5 Jan 2019 at 20:33, Roman Yurchak ***@***.***> wrote:
I agree with the idea of making externals private, but we tried to rename
joblib to _joblib and failed (see e.g. #11408 (comment)
<#11408 (comment)>).
The same applies to moving externals to _externals. I'm not saying that's
not possible, maybe it's easier with Py3 only, but it would probably
involve messing with the import mechanism: i.e. making,
from sklearn.externals.some_module import something
work (with a deprecation warning) without sklearn/externals/some_module.py
existing on the file system, after it was moved to sklearn/_externals/
This can result in other unexpected issues and I don't think it's worth it.
In practice, arff and pilutils are already put in private modules within
externals so what remains is joblib and six, both of which are going to
be removed. Having a sklearn.externals that only contains private modules
would be a bit equivalent in the end.
The question is how to remove joblib and six,
- for six it was proposed in #12916
<#12916> (cc
@qinhanmin2014 <https://github.com/qinhanmin2014> ) let's move that
discussion there.
- for joblib, once we stop using the vendored version, putting a
deprecation warning in joblib.__init__, making sure it's not collected
by pytest and waiting for a few versions before removal could be enough?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#11182 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEz60471Cr3zeHv9qWEk6gMFUYPeIP_ks5vAHF-gaJpZM4UW4yy>
.
|
I think this was mostly solved. joblib is removed, and most other modules except for six are private,
we could rename the |
@rth I'm happy to close this, what do you think? |
Sounds good. |
I think we should make externals private to make it easier to stop vendoring things. I don't think users should use the joblib that comes with sklearn.
I don't think externals should have ever been public, but in particular in light of #11166 and #11115 I think now is a good time to deprecate the public version. Otherwise we might end up having to provide backports for 2.7 when we don't support it any more...
The text was updated successfully, but these errors were encountered: