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

Skip to content

Commit d53d472

Browse files
committed
FIX/TST Make sure the old deprecation warning can be checked against
1 parent 2dedf51 commit d53d472

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

sklearn/cross_validation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@
6161
'permutation_test_score',
6262
'train_test_split']
6363

64-
@deprecated("FitFailedWarning has been moved into the sklearn.exceptions"
65-
" module. It will not be available here from version 0.19")
66-
class FitFailedWarning(_FitFailedWarning):
67-
pass
64+
FitFailedWarning = deprecated(
65+
"FitFailedWarning has been moved into the sklearn.exceptions"
66+
" module. It will not be available here from version 0.19")(
67+
_FitFailedWarning)
6868

6969

7070
class _PartitionIterator(with_metaclass(ABCMeta)):

sklearn/tests/test_grid_search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@
4242
from sklearn.metrics import f1_score
4343
from sklearn.metrics import make_scorer
4444
from sklearn.metrics import roc_auc_score
45-
from sklearn.exceptions import FitFailedWarning
4645
from sklearn.exceptions import ChangedBehaviorWarning
4746

4847
with warnings.catch_warnings():
4948
warnings.simplefilter('ignore')
5049
from sklearn.grid_search import GridSearchCV, RandomizedSearchCV
5150
from sklearn.grid_search import ParameterGrid, ParameterSampler
5251
from sklearn.cross_validation import KFold, StratifiedKFold
52+
from sklearn.cross_validation import FitFailedWarning
5353

5454
from sklearn.preprocessing import Imputer
5555
from sklearn.pipeline import Pipeline

0 commit comments

Comments
 (0)