-
-
Notifications
You must be signed in to change notification settings - Fork 26.1k
[MRG + 2] Deprecates load_lfw_pairs and load_lfw_people #4431
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
Conversation
What you have done is not a deprecation, but a removal :). You need to keep the functions in, and at to them a "deprecated" decorated that says that they will be removed in 2 releases (give the release name). The idea is that we should never break user's code without warning. Removing them from the docs is however a good idea. |
Oops, sorry. I'll add the decorator. Do we need to test Also, should I add a test checking if the warning is raised? |
Reverted changes made in |
|
3a385f0
to
6479394
Compare
keep the tests, but catch the warnings (possibly add |
Removed in 0.19 unfortunately ;) (this is the 0.17 branch) |
Oops, I'll change it. |
|
||
|
||
def test_load_fake_lfw_pairs(): | ||
lfw_pairs_train = load_lfw_pairs(data_home=SCIKIT_LEARN_DATA) | ||
with warnings.catch_warnings(): | ||
lfw_pairs_train = load_lfw_pairs(data_home=SCIKIT_LEARN_DATA) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, is there such a test for fetch_lfw_pairs
? If there is not, the tests should just be for fetch
not load
. If there are tests for both, just keep them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There aren't any tests for fetch_lfw_pairs
or fetch_lfw_people
[checked using git grep]. Maybe I could add the same tests for fetch_lfw
by copying and renaming these existing tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. Sorry then my previous guidance was wrong. I thought there were tests for both. Please rename all tests to use fetch_lfw_pairs
. If you like, you can do a for loop in the tests over both functions, but I don't think this is necessary.
fe23b9b
to
843ee88
Compare
|
LGTM |
@ogrisel - can you review this? :) |
Added deprecated decorator Added import statement Added tests Added newline Ignored deprecation warnings Renamed tests for fetch_lfw_ Added imports for load_lfw_
843ee88
to
ce5fada
Compare
The only thing here is removing something (load_x) that isn't inline with the rest of the API, right? If so, it looks ok to me. |
it removes an undocumented alias. |
Ok well consider this my +1 then! On Thu, Apr 16, 2015 at 3:55 PM, Andreas Mueller notifications@github.com
|
[MRG + 2] Deprecates load_lfw_pairs and load_lfw_people
#4425 I was wondering if this needs a
DeprecationWarning
or some change in the doc?ping @amueller @ogrisel