Repository: scikit-learn/scikit-learn
Pull request: [MRG] Replace DeprecationWarning with FutureWarning
closes https://github.com/scikit-learn/scikit-learn/issues/9857

This PR replaces `DeprecationWarning` with a newly created `SklearnDeprecationWarning` (similar to numpy's `VisibleDeprecationWarning`).

This fixes the custom filter issue raised in #9857 (custom filter are bad basically)

The downside is that users who are already ignoring the `DeprecationWarning` will need to change their code to now ignore the `SklearnDeprecationWarning`.

There's no backward compatibility guarantee regarding warnings, but if this PR gets merged, we should make sure to let users know as much as possible

Also we should give an update on [this SO question](https://stackoverflow.com/questions/32612180/eliminating-warnings-from-scikit-learn)

EDIT: changed name from `VisibleDeprecationWarning` to `SklearnDeprecationWarning`

EDIT: changed again to raise `FutureWarning`

Problem statement:
Should not call `warnings.filterwarnings` in a library
#### Description

Importing sklearn changes the current warning filters, making it very difficult to debug warnings using standard Python syntax, e.g `-W` command flag.

#### Steps/Code to Reproduce

The module `sklearn.cross_validation` is deprecated, and importing it results in a warning.

```
$ python3.6 -c 'import mypackage'
/usr/local/lib/python3.6/dist-packages/sklearn/cross_validation.py:41: DeprecationWarning:
This module was deprecated in version 0.18 in favor of the model_selection module into
which all the refactored classes and functions are moved. Also note that the interface of
the new CV iterators are different from that of this module. This module will be removed
in 0.20.
  "This module will be removed in 0.20.", DeprecationWarning)
```

Okay, I'm surprised to see a DeprecationWarning — that's not supposed to happen in Python unless I ask to see it — but let me try to get a stack trace so I can see where it's coming from.

```
$ python3.6 -W error::DeprecationWarning:: -c 'import mypackage'
/usr/local/lib/python3.6/dist-packages/sklearn/cross_validation.py:41: DeprecationWarning:
This module was deprecated in version 0.18 in favor of the model_selection module into
which all the refactored classes and functions are moved. Also note that the interface of
the new CV iterators are different from that of this module. This module will be removed
in 0.20.
  "This module will be removed in 0.20.", DeprecationWarning)
```

Oh that's weird, the `-W error::DeprecationWarning::` should raise the warning an exception, which would show me a full stack trace and tell me where `sklearn.cross_validation` is being imported from. Why does the configuration flag have no effect? 

I tried playing with the flags for a while, then eventually realized that it is not possible to change sklearn's warning filter, _because it is hardcoded in the module!_

#### Expected Results

1. At the very least, honor the user's warning filters and don't change the warning filter to something that the user didn't ask for.
2. Ideally, don't configure warning filters at all. This behavior should be controlled by an application or an end user, not a library.

If the `warnings.filterwarnings(…)` is removed completely, then the result would be expected Python behavior and I would be able to debug this very quickly:

```
$ python3.6 -W error::DeprecationWarning:: -c 'import mypackage'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.6/dist-packages/mypackage/__init__.py", line 5, in <module>
    from .classifiers import (
  File "/usr/local/lib/python3.6/dist-packages/formasaurus/classifiers.py", line 8, in <module>
    from mypackage import formtype_model, mypackage
  File "/usr/local/lib/python3.6/dist-packages/mypackage/formtype_model.py", line 9, in <module>
    from mypackage.annotation import get_annotation_folds
  File "/usr/local/lib/python3.6/dist-packages/mypackage/annotation.py", line 5, in <module>
    from sklearn.cross_validation import LabelKFold
  File "/usr/local/lib/python3.6/dist-packages/sklearn/cross_validation.py", line 41, in <module>
    "This module will be removed in 0.20.", DeprecationWarning)
DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
```

`sklearn` is not special enough to break with standard Python conventions.

Hints from issue discussion:
This issue leads to other confusion, e.g. https://github.com/scikit-learn/scikit-learn/issues/7963
You're right that we may be being bad citizens. We've forcibly shown the DeprecationWarnings for a long time now.

And I can't see an easy way to determine whether the user has tried to override default settings. The presence of DeprecationWarning twice in warnings.filters?

One way to change this would be to make a custom deprecation warning class that does not inherit from DeprecationWarning. There are questions of backwards compatibility there...
@mehaase I think that is just an issue of principles vs real world and I am afraid that the latter tends to win in the long run. If there is a way to be a better citizen, given the constraints mentioned by @jnothman (look at #7963 and probably the associated PR https://github.com/scikit-learn/scikit-learn/pull/7995 for more details), then a PR is more than welcome.

If not, for the few cases where this is annoying, I would just recommend to comment out the line in `sklearn/__init__.py` and carry on with your life.

For the record, numpy modifies warnings.filters as does ipython.
And while I am at it, let me mention this: we may be able to use the `stacklevel` argument in warnings.warn a bit better, if we were using it correctly (and with tests), the warnings would show you the offending line and you would not need to turn warnings into errors.

In @mehaase case, the warnings would point at where he imports sklearn.cross_validation, rather than sklearn/cross_validation.py which he can not do anything about. Maybe that is what #7995 was partially about, I don't remember all the details.
It sounds like it's an issue with python, if libraries are able to (and are
forced to to set defaults) override some user discussed filters. Is there a
good way for library developers to do this?

In the [Adaptive documentation](https://adaptive.readthedocs.io) we use [Juypter-sphinx](https://github.com/jupyter-widgets/jupyter-sphinx) to execute code.

Whenever there is a warning, Jupyter-sphinx will raise an error. This result in [failed builds](https://readthedocs.org/projects/adaptive/builds/9438355/).

Unfortunately, because of this issue here, filtering out the warnings (like done [here](https://github.com/python-adaptive/adaptive/commit/4c473e96ae30bc5c10f1b48edeb16fee052ac799)) doesn't work.

This issue is really quite annoying and means that we have to pin the old `scikit-learn` in order to suppress the warning.

Like many others have remarked before (i.e. https://github.com/scikit-learn/scikit-learn/issues/11792), this is very bad behavior. 
@basnijholt suggestions for solutions are welcome.
The behavior we want is that our warnings are shown by default. However, people that have explicitly filtered our warnings previously should probably also not receive our warnings.
If we replace ``DeprecationWarning`` with a custom class, people that ignored our warnings with any warning filter using ``DeprecationWarning`` will get the warning again.

As a workaround for your case, can't you ``import sklearn`` and then set the filter?

Maybe we should just make the backward-incompatible change to a custom warning. I'm quite sure it'll annoy way more users than the current situation does, though.
We should probably also figure out why "append" doesn't work:
https://github.com/scikit-learn/scikit-learn/issues/11792#issuecomment-412268953
> We should probably also figure out why "append" doesn't work:

The default warning filters are:

```
default::DeprecationWarning:__main__
ignore::DeprecationWarning
ignore::PendingDeprecationWarning
ignore::ImportWarning
ignore::ResourceWarning
```

which will filter out DeprecationWarnings not in `__main__`. If we use append, the sklearn filter warning is on the bottom (appended). This means, the `ignore::DeprecationWarning` will filter out the warning before it gets to our `always::sklearn.` filter.
We could check if the user wanted to error and then leave it at that to fix a small part of the issue.
I don't see how we could fix the real issue without breaking backward compatibility but maybe we should do it as a bug fix?

Commit message: Merge branch 'master' of github.com:scikit-learn/scikit-learn into visibledepwarnings

Patch to review:
diff --git a/build_tools/azure/test_script.cmd b/build_tools/azure/test_script.cmd
index f1e516d81fd99..9c5be1b50d494 100644
--- a/build_tools/azure/test_script.cmd
+++ b/build_tools/azure/test_script.cmd
@@ -10,7 +10,7 @@ mkdir %TMP_FOLDER%
 cd %TMP_FOLDER%
 
 if "%CHECK_WARNINGS%" == "true" (
-    set PYTEST_ARGS=%PYTEST_ARGS% -Werror::DeprecationWarning -Werror::FutureWarning
+    set PYTEST_ARGS=%PYTEST_ARGS% -Werror::FutureWarning
 )
 
 if "%COVERAGE%" == "true" (
diff --git a/build_tools/azure/test_script.sh b/build_tools/azure/test_script.sh
index 77a950d86549c..3091019f5bc5d 100755
--- a/build_tools/azure/test_script.sh
+++ b/build_tools/azure/test_script.sh
@@ -29,7 +29,7 @@ if [[ "$COVERAGE" == "true" ]]; then
 fi
 
 if [[ -n "$CHECK_WARNINGS" ]]; then
-    TEST_CMD="$TEST_CMD -Werror::DeprecationWarning -Werror::FutureWarning"
+    TEST_CMD="$TEST_CMD -Werror::FutureWarning"
 fi
 
 if [[ "$PYTHON_VERSION" == "*" ]]; then
diff --git a/build_tools/travis/test_script.sh b/build_tools/travis/test_script.sh
index f13e0f1bbb2fa..50854bd4b312b 100755
--- a/build_tools/travis/test_script.sh
+++ b/build_tools/travis/test_script.sh
@@ -40,7 +40,7 @@ run_tests() {
     fi
 
     if [[ -n "$CHECK_WARNINGS" ]]; then
-        TEST_CMD="$TEST_CMD -Werror::DeprecationWarning -Werror::FutureWarning"
+        TEST_CMD="$TEST_CMD -Werror::FutureWarning"
     fi
 
     set -x  # print executed commands to the terminal
diff --git a/doc/developers/contributing.rst b/doc/developers/contributing.rst
index 719b129f72bc4..b7f80231fa5d3 100644
--- a/doc/developers/contributing.rst
+++ b/doc/developers/contributing.rst
@@ -826,7 +826,8 @@ E.g., renaming an attribute ``labels_`` to ``classes_`` can be done as::
     def labels_(self):
         return self.classes_
 
-If a parameter has to be deprecated, use ``DeprecationWarning`` appropriately.
+If a parameter has to be deprecated, a ``FutureWarning`` warning
+must be raised too.
 In the following example, k is deprecated and renamed to n_clusters::
 
     import warnings
@@ -834,7 +835,8 @@ In the following example, k is deprecated and renamed to n_clusters::
     def example_function(n_clusters=8, k='deprecated'):
         if k != 'deprecated':
             warnings.warn("'k' was renamed to n_clusters in version 0.13 and "
-                          "will be removed in 0.15.", DeprecationWarning)
+                          "will be removed in 0.15.",
+                          FutureWarning)
             n_clusters = k
 
 When the change is in a class, we validate and raise warning in ``fit``::
@@ -849,7 +851,8 @@ When the change is in a class, we validate and raise warning in ``fit``::
       def fit(self, X, y):
           if self.k != 'deprecated':
               warnings.warn("'k' was renamed to n_clusters in version 0.13 and "
-                            "will be removed in 0.15.", DeprecationWarning)
+                            "will be removed in 0.15.",
+                            FutureWarning)
               self._n_clusters = self.k
           else:
               self._n_clusters = self.n_clusters
diff --git a/doc/developers/tips.rst b/doc/developers/tips.rst
index 76b655274ef28..fa605260c8b3a 100644
--- a/doc/developers/tips.rst
+++ b/doc/developers/tips.rst
@@ -102,10 +102,10 @@ Other `pytest` options that may become useful include:
     statements
   - ``--tb=short`` or ``--tb=line`` to control the length of the logs
 
-Since our continuous integration tests will error if ``DeprecationWarning``
-or ``FutureWarning`` aren't properly caught, it is also recommended to run
-``pytest`` along with the ``-Werror::DeprecationWarning`` and
-``-Werror::FutureWarning`` flags.
+Since our continuous integration tests will error if
+``FutureWarning`` or ``FutureWarning`` aren't properly caught,
+it is also recommended to run ``pytest`` along with the
+``-Werror::FutureWarning`` flag.
 
 .. _saved_replies:
 
diff --git a/sklearn/__init__.py b/sklearn/__init__.py
index 036fb4d312279..8b897eadc03e6 100644
--- a/sklearn/__init__.py
+++ b/sklearn/__init__.py
@@ -14,7 +14,6 @@
 """
 import sys
 import re
-import warnings
 import logging
 import os
 
@@ -25,10 +24,6 @@
 logger.setLevel(logging.INFO)
 
 
-# Make sure that DeprecationWarning within this package always gets printed
-warnings.filterwarnings('always', category=DeprecationWarning,
-                        module=r'^{0}\.'.format(re.escape(__name__)))
-
 # PEP0440 compatible formatted version, see:
 # https://www.python.org/dev/peps/pep-0440/
 #
diff --git a/sklearn/cluster/tests/test_hierarchical.py b/sklearn/cluster/tests/test_hierarchical.py
index 26d489d0ded22..190455f7cbd56 100644
--- a/sklearn/cluster/tests/test_hierarchical.py
+++ b/sklearn/cluster/tests/test_hierarchical.py
@@ -734,6 +734,6 @@ def test_n_components_deprecation():
 
     match = ("``n_components_`` attribute was deprecated "
              "in favor of ``n_connected_components_``")
-    with pytest.warns(DeprecationWarning, match=match):
+    with pytest.warns(FutureWarning, match=match):
         n = agc.n_components_
     assert n == agc.n_connected_components_
diff --git a/sklearn/compose/_column_transformer.py b/sklearn/compose/_column_transformer.py
index 2420b043d5867..f9ec07f822bcc 100644
--- a/sklearn/compose/_column_transformer.py
+++ b/sklearn/compose/_column_transformer.py
@@ -422,7 +422,7 @@ def _validate_features(self, n_features, feature_names):
             warnings.warn("Given feature/column names or counts do not match "
                           "the ones for the data given during fit. This will "
                           "fail from v0.24.",
-                          DeprecationWarning)
+                          FutureWarning)
 
     def _log_message(self, name, idx, total):
         if not self.verbose:
diff --git a/sklearn/compose/tests/test_column_transformer.py b/sklearn/compose/tests/test_column_transformer.py
index 094b2769de369..f854fb139fd18 100644
--- a/sklearn/compose/tests/test_column_transformer.py
+++ b/sklearn/compose/tests/test_column_transformer.py
@@ -500,7 +500,7 @@ def test_column_transformer_invalid_columns(remainder):
     X_array_more = np.array([[0, 1, 2], [2, 4, 6], [3, 6, 9]]).T
     msg = ("Given feature/column names or counts do not match the ones for "
            "the data given during fit.")
-    with pytest.warns(DeprecationWarning, match=msg):
+    with pytest.warns(FutureWarning, match=msg):
         ct.transform(X_array_more)  # Should accept added columns, for now
     X_array_fewer = np.array([[0, 1, 2], ]).T
     err_msg = 'Number of features'
@@ -1108,7 +1108,7 @@ def test_column_transformer_reordered_column_names_remainder(explicit_colname):
     # No error for added columns if ordering is identical
     X_extended_df = X_fit_df.copy()
     X_extended_df['third'] = [3, 6, 9]
-    with pytest.warns(DeprecationWarning, match=warn_msg):
+    with pytest.warns(FutureWarning, match=warn_msg):
         tf.transform(X_extended_df)  # No error should be raised, for now
 
     # No 'columns' AttributeError when transform input is a numpy array
@@ -1133,13 +1133,13 @@ def test_feature_name_validation():
 
     msg = ("Given feature/column names or counts do not match the ones for "
            "the data given during fit.")
-    with pytest.warns(DeprecationWarning, match=msg):
+    with pytest.warns(FutureWarning, match=msg):
         tf.transform(df_extra)
 
     tf = ColumnTransformer([('bycol', Trans(), [0])])
     tf.fit(df)
 
-    with pytest.warns(DeprecationWarning, match=msg):
+    with pytest.warns(FutureWarning, match=msg):
         tf.transform(X_extra)
 
     with warnings.catch_warnings(record=True) as warns:
@@ -1149,7 +1149,7 @@ def test_feature_name_validation():
     tf = ColumnTransformer([('bycol', Trans(), ['a'])],
                            remainder=Trans())
     tf.fit(df)
-    with pytest.warns(DeprecationWarning, match=msg):
+    with pytest.warns(FutureWarning, match=msg):
         tf.transform(df_extra)
 
     tf = ColumnTransformer([('bycol', Trans(), [0, -1])])
diff --git a/sklearn/datasets/base.py b/sklearn/datasets/base.py
index d53f6c6d01ccf..0c26af00aa6ca 100644
--- a/sklearn/datasets/base.py
+++ b/sklearn/datasets/base.py
@@ -945,6 +945,6 @@ def _refresh_cache(files, compress):
                        "import path. Consider removing the following files "
                        "and allowing it to be cached anew:\n%s"
                        % ("\n".join(files)))
-            warnings.warn(message=message, category=DeprecationWarning)
+            warnings.warn(message=message, category=FutureWarning)
 
     return data[0] if len(data) == 1 else data
diff --git a/sklearn/datasets/tests/test_base.py b/sklearn/datasets/tests/test_base.py
index a9954c3df0702..1013eafe78c52 100644
--- a/sklearn/datasets/tests/test_base.py
+++ b/sklearn/datasets/tests/test_base.py
@@ -292,11 +292,11 @@ def _load_warn(*args, **kwargs):
                "If this warning is raised when loading pickled models, you "
                "may need to re-serialize those models with scikit-learn "
                "0.21+.")
-        warnings.warn(msg, DeprecationWarning)
+        warnings.warn(msg, FutureWarning)
         return 0
 
     def _load_warn_unrelated(*args, **kwargs):
-        warnings.warn("unrelated warning", DeprecationWarning)
+        warnings.warn("unrelated warning", FutureWarning)
         return 0
 
     def _dump_safe(*args, **kwargs):
@@ -312,7 +312,7 @@ def _dump_raise(*args, **kwargs):
     monkeypatch.setattr(joblib, "load", _load_warn)
     monkeypatch.setattr(joblib, "dump", _dump_raise)
     msg = "This dataset will stop being loadable in scikit-learn"
-    with pytest.warns(DeprecationWarning, match=msg):
+    with pytest.warns(FutureWarning, match=msg):
         _refresh_cache('test', 0)
 
     # make sure no warning is raised if load raises the warning, but dump
@@ -327,5 +327,5 @@ def _dump_raise(*args, **kwargs):
     # by _refresh_cache
     monkeypatch.setattr(joblib, "load", _load_warn_unrelated)
     monkeypatch.setattr(joblib, "dump", _dump_safe)
-    with pytest.warns(DeprecationWarning, match="unrelated warning"):
+    with pytest.warns(FutureWarning, match="unrelated warning"):
         _refresh_cache('test', 0)
diff --git a/sklearn/decomposition/sparse_pca.py b/sklearn/decomposition/sparse_pca.py
index 50f869fa4b1e8..9ef7f0753af68 100644
--- a/sklearn/decomposition/sparse_pca.py
+++ b/sklearn/decomposition/sparse_pca.py
@@ -20,7 +20,7 @@ def _check_normalize_components(normalize_components, estimator_name):
             warnings.warn(
                 "'normalize_components' has been deprecated in 0.22 and "
                 "will be removed in 0.24. Remove the parameter from the "
-                " constructor.", DeprecationWarning
+                " constructor.", FutureWarning
             )
         else:
             raise NotImplementedError(
diff --git a/sklearn/decomposition/tests/test_sparse_pca.py b/sklearn/decomposition/tests/test_sparse_pca.py
index 5d3f265cb9418..3434a7a51cfb4 100644
--- a/sklearn/decomposition/tests/test_sparse_pca.py
+++ b/sklearn/decomposition/tests/test_sparse_pca.py
@@ -13,7 +13,6 @@
 from sklearn.decomposition import SparsePCA, MiniBatchSparsePCA, PCA
 from sklearn.utils import check_random_state
 
-
 def generate_toy_data(n_components, n_samples, image_size, random_state=None):
     n_features = image_size[0] * image_size[1]
 
@@ -196,7 +195,7 @@ def test_spca_deprecation_warning(spca):
     Y, _, _ = generate_toy_data(3, 10, (8, 8), random_state=rng)
 
     warn_msg = "'normalize_components' has been deprecated in 0.22"
-    with pytest.warns(DeprecationWarning, match=warn_msg):
+    with pytest.warns(FutureWarning, match=warn_msg):
         spca(normalize_components=True).fit(Y)
 
 
diff --git a/sklearn/ensemble/gradient_boosting.py b/sklearn/ensemble/gradient_boosting.py
index 8c91a473a8572..33db3c890a601 100644
--- a/sklearn/ensemble/gradient_boosting.py
+++ b/sklearn/ensemble/gradient_boosting.py
@@ -1339,7 +1339,7 @@ def _check_params(self):
                           "suppress this warning by not passing any value "
                           "to the 'presort' parameter. We also recommend "
                           "using HistGradientBoosting models instead.",
-                          DeprecationWarning)
+                          FutureWarning)
 
     def _init_state(self):
         """Initialize model state and allocate model state data structures. """
diff --git a/sklearn/ensemble/iforest.py b/sklearn/ensemble/iforest.py
index 350098091d988..50f8252796b8b 100644
--- a/sklearn/ensemble/iforest.py
+++ b/sklearn/ensemble/iforest.py
@@ -226,7 +226,7 @@ def fit(self, X, y=None, sample_weight=None):
                 warn(
                     "'behaviour' is deprecated in 0.22 and will be removed "
                     "in 0.24. You should not pass or set this parameter.",
-                    DeprecationWarning
+                    FutureWarning
                 )
             else:
                 raise NotImplementedError(
diff --git a/sklearn/ensemble/tests/test_forest.py b/sklearn/ensemble/tests/test_forest.py
index e8e38133e268e..fef0e9be8158e 100644
--- a/sklearn/ensemble/tests/test_forest.py
+++ b/sklearn/ensemble/tests/test_forest.py
@@ -1237,7 +1237,8 @@ def test_min_impurity_split():
 
     for Estimator in all_estimators:
         est = Estimator(min_impurity_split=0.1)
-        est = assert_warns_message(DeprecationWarning, "min_impurity_decrease",
+        est = assert_warns_message(FutureWarning,
+                                   "min_impurity_decrease",
                                    est.fit, X, y)
         for tree in est.estimators_:
             assert tree.min_impurity_split == 0.1
diff --git a/sklearn/ensemble/tests/test_gradient_boosting.py b/sklearn/ensemble/tests/test_gradient_boosting.py
index a2c1373df95e5..0c94910cb1d3c 100644
--- a/sklearn/ensemble/tests/test_gradient_boosting.py
+++ b/sklearn/ensemble/tests/test_gradient_boosting.py
@@ -1086,7 +1086,8 @@ def test_min_impurity_split(GBEstimator):
     X, y = datasets.make_hastie_10_2(n_samples=100, random_state=1)
 
     est = GBEstimator(min_impurity_split=0.1)
-    est = assert_warns_message(DeprecationWarning, "min_impurity_decrease",
+    est = assert_warns_message(FutureWarning,
+                               "min_impurity_decrease",
                                est.fit, X, y)
     for tree in est.estimators_.flat:
         assert tree.min_impurity_split == 0.1
@@ -1413,6 +1414,6 @@ def test_presort_deprecated(Cls, presort):
     X = np.zeros((10, 10))
     y = np.r_[[0] * 5, [1] * 5]
     gb = Cls(presort=presort)
-    with pytest.warns(DeprecationWarning,
+    with pytest.warns(FutureWarning,
                       match="The parameter 'presort' is deprecated "):
         gb.fit(X, y)
diff --git a/sklearn/ensemble/tests/test_iforest.py b/sklearn/ensemble/tests/test_iforest.py
index f7f9791a4bd4d..88ecab99f712f 100644
--- a/sklearn/ensemble/tests/test_iforest.py
+++ b/sklearn/ensemble/tests/test_iforest.py
@@ -320,7 +320,7 @@ def test_iforest_chunks_works2(
 def test_iforest_deprecation():
     iforest = IsolationForest(behaviour='new')
     warn_msg = "'behaviour' is deprecated in 0.22 and will be removed in 0.24"
-    with pytest.warns(DeprecationWarning, match=warn_msg):
+    with pytest.warns(FutureWarning, match=warn_msg):
         iforest.fit(iris.data)
 
 
diff --git a/sklearn/ensemble/tests/test_partial_dependence.py b/sklearn/ensemble/tests/test_partial_dependence.py
index dc0e0419e812e..9efd346d2f270 100644
--- a/sklearn/ensemble/tests/test_partial_dependence.py
+++ b/sklearn/ensemble/tests/test_partial_dependence.py
@@ -27,7 +27,7 @@
 iris = datasets.load_iris()
 
 
-@ignore_warnings(category=DeprecationWarning)
+@ignore_warnings(category=FutureWarning)
 def test_partial_dependence_classifier():
     # Test partial dependence for classifier
     clf = GradientBoostingClassifier(n_estimators=10, random_state=1)
@@ -66,7 +66,7 @@ def test_partial_dependence_classifier():
     assert np.all(np.abs(pdp_w2 - pdp_w) / np.abs(pdp_w) > 0.1)
 
 
-@ignore_warnings(category=DeprecationWarning)
+@ignore_warnings(category=FutureWarning)
 def test_partial_dependence_multiclass():
     # Test partial dependence for multi-class classifier
     clf = GradientBoostingClassifier(n_estimators=10, random_state=1)
@@ -82,7 +82,7 @@ def test_partial_dependence_multiclass():
     assert axes[0].shape[0] == grid_resolution
 
 
-@ignore_warnings(category=DeprecationWarning)
+@ignore_warnings(category=FutureWarning)
 def test_partial_dependence_regressor():
     # Test partial dependence for regressor
     clf = GradientBoostingRegressor(n_estimators=10, random_state=1)
@@ -96,7 +96,7 @@ def test_partial_dependence_regressor():
     assert axes[0].shape[0] == grid_resolution
 
 
-@ignore_warnings(category=DeprecationWarning)
+@ignore_warnings(category=FutureWarning)
 def test_partial_dependence_sample_weight():
     # Test near perfect correlation between partial dependence and diagonal
     # when sample weights emphasize y = x predictions
@@ -122,7 +122,7 @@ def test_partial_dependence_sample_weight():
     assert np.corrcoef(np.ravel(pdp[0]), grid)[0, 1] > 0.99
 
 
-@ignore_warnings(category=DeprecationWarning)
+@ignore_warnings(category=FutureWarning)
 def test_partial_dependecy_input():
     # Test input validation of partial dependence.
     clf = GradientBoostingClassifier(n_estimators=10, random_state=1)
@@ -151,7 +151,7 @@ def test_partial_dependecy_input():
     assert_raises(ValueError, partial_dependence, clf, [0], grid=grid)
 
 
-@ignore_warnings(category=DeprecationWarning)
+@ignore_warnings(category=FutureWarning)
 @pytest.mark.filterwarnings('ignore: Using or importing the ABCs from')
 # matplotlib Python3.7 warning
 def test_plot_partial_dependence(pyplot):
@@ -187,7 +187,7 @@ def test_plot_partial_dependence(pyplot):
 
 @pytest.mark.filterwarnings('ignore: Using or importing the ABCs from')
 # matplotlib Python3.7 warning
-@ignore_warnings(category=DeprecationWarning)
+@ignore_warnings(category=FutureWarning)
 def test_plot_partial_dependence_input(pyplot):
     # Test partial dependence plot function input checks.
     clf = GradientBoostingClassifier(n_estimators=10, random_state=1)
@@ -224,7 +224,7 @@ def test_plot_partial_dependence_input(pyplot):
 
 @pytest.mark.filterwarnings('ignore: Using or importing the ABCs from')
 # matplotlib Python3.7 warning
-@ignore_warnings(category=DeprecationWarning)
+@ignore_warnings(category=FutureWarning)
 def test_plot_partial_dependence_multiclass(pyplot):
     # Test partial dependence plot function on multi-class input.
     clf = GradientBoostingClassifier(n_estimators=10, random_state=1)
@@ -273,5 +273,5 @@ def test_raise_deprecation_warning(pyplot, func, params):
     warn_msg = "The function ensemble.{} has been deprecated".format(
         func.__name__
     )
-    with pytest.warns(DeprecationWarning, match=warn_msg):
+    with pytest.warns(FutureWarning, match=warn_msg):
         func(clf, **params, grid_resolution=grid_resolution)
diff --git a/sklearn/feature_extraction/tests/test_feature_hasher.py b/sklearn/feature_extraction/tests/test_feature_hasher.py
index 8c321c8b15eda..af0ce07f51b14 100644
--- a/sklearn/feature_extraction/tests/test_feature_hasher.py
+++ b/sklearn/feature_extraction/tests/test_feature_hasher.py
@@ -144,7 +144,7 @@ def test_hasher_zeros():
     assert X.data.shape == (0,)
 
 
-@ignore_warnings(category=DeprecationWarning)
+@ignore_warnings(category=FutureWarning)
 def test_hasher_alternate_sign():
     X = [list("Thequickbrownfoxjumped")]
 
diff --git a/sklearn/feature_extraction/tests/test_text.py b/sklearn/feature_extraction/tests/test_text.py
index 6ea91f90653b0..99e7cd5f77f37 100644
--- a/sklearn/feature_extraction/tests/test_text.py
+++ b/sklearn/feature_extraction/tests/test_text.py
@@ -542,7 +542,7 @@ def test_tfidf_vectorizer_deprecationwarning():
     msg = ("'copy' param is unused and has been deprecated since "
            "version 0.22. Backward compatibility for 'copy' will "
            "be removed in 0.24.")
-    with pytest.warns(DeprecationWarning, match=msg):
+    with pytest.warns(FutureWarning, match=msg):
         tv = TfidfVectorizer()
         train_data = JUNK_FOOD_DOCS
         tv.fit(train_data)
diff --git a/sklearn/feature_extraction/text.py b/sklearn/feature_extraction/text.py
index 5e76183458ecf..0b6092660efb0 100644
--- a/sklearn/feature_extraction/text.py
+++ b/sklearn/feature_extraction/text.py
@@ -1831,7 +1831,7 @@ def transform(self, raw_documents, copy="deprecated"):
             msg = ("'copy' param is unused and has been deprecated since "
                    "version 0.22. Backward compatibility for 'copy' will "
                    "be removed in 0.24.")
-            warnings.warn(msg, DeprecationWarning)
+            warnings.warn(msg, FutureWarning)
         X = super().transform(raw_documents)
         return self._tfidf.transform(X, copy=False)
 
diff --git a/sklearn/inspection/partial_dependence.py b/sklearn/inspection/partial_dependence.py
index 69d87947ec8df..5455447435aa3 100644
--- a/sklearn/inspection/partial_dependence.py
+++ b/sklearn/inspection/partial_dependence.py
@@ -644,7 +644,7 @@ def convert_feature(fx):
     if fig is not None:
         warnings.warn("The fig parameter is deprecated in version "
                       "0.22 and will be removed in version 0.24",
-                      DeprecationWarning)
+                      FutureWarning)
         fig.clear()
         ax = fig.gca()
 
diff --git a/sklearn/inspection/tests/test_plot_partial_dependence.py b/sklearn/inspection/tests/test_plot_partial_dependence.py
index bc0568b058be4..d30a5868fcd08 100644
--- a/sklearn/inspection/tests/test_plot_partial_dependence.py
+++ b/sklearn/inspection/tests/test_plot_partial_dependence.py
@@ -369,7 +369,7 @@ def test_plot_partial_dependence_fig_deprecated(pyplot):
 
     msg = ("The fig parameter is deprecated in version 0.22 and will be "
            "removed in version 0.24")
-    with pytest.warns(DeprecationWarning, match=msg):
+    with pytest.warns(FutureWarning, match=msg):
         plot_partial_dependence(
             clf, X, [0, 1], target=0, grid_resolution=grid_resolution, fig=fig)
 
diff --git a/sklearn/linear_model/least_angle.py b/sklearn/linear_model/least_angle.py
index d6b9609efb383..bf8c68b9b2e07 100644
--- a/sklearn/linear_model/least_angle.py
+++ b/sklearn/linear_model/least_angle.py
@@ -157,7 +157,7 @@ def lars_path(X, y, Xy=None, Gram=None, max_iter=500, alpha_min=0,
     if X is None and Gram is not None:
         warnings.warn('Use lars_path_gram to avoid passing X and y. '
                       'The current option will be removed in v0.23.',
-                      DeprecationWarning)
+                      FutureWarning)
     return _lars_path_solver(
         X=X, y=y, Xy=Xy, Gram=Gram, n_samples=None, max_iter=max_iter,
         alpha_min=alpha_min, method=method, copy_X=copy_X,
diff --git a/sklearn/linear_model/tests/test_logistic.py b/sklearn/linear_model/tests/test_logistic.py
index 3f998212ddf6a..da8cd685f0004 100644
--- a/sklearn/linear_model/tests/test_logistic.py
+++ b/sklearn/linear_model/tests/test_logistic.py
@@ -1729,7 +1729,7 @@ def fit(X, y, **kw):
 
 def test_logistic_regression_path_deprecation():
 
-    assert_warns_message(DeprecationWarning,
+    assert_warns_message(FutureWarning,
                          "logistic_regression_path was deprecated",
                          logistic_regression_path, X, Y1)
 
diff --git a/sklearn/linear_model/tests/test_ridge.py b/sklearn/linear_model/tests/test_ridge.py
index d5940cc8baa3a..b778c8265805e 100644
--- a/sklearn/linear_model/tests/test_ridge.py
+++ b/sklearn/linear_model/tests/test_ridge.py
@@ -522,10 +522,10 @@ def test_ridge_gcv_sample_weights(
     kfold = RidgeCV(
         alphas=alphas, cv=splits, scoring='neg_mean_squared_error',
         fit_intercept=fit_intercept)
-    # ignore warning from GridSearchCV: DeprecationWarning: The default of the
-    # `iid` parameter will change from True to False in version 0.22 and will
-    # be removed in 0.24
-    with ignore_warnings(category=DeprecationWarning):
+    # ignore warning from GridSearchCV: FutureWarning: The default
+    # of the `iid` parameter will change from True to False in version 0.22
+    # and will be removed in 0.24
+    with ignore_warnings(category=FutureWarning):
         kfold.fit(X_tiled, y_tiled)
 
     ridge_reg = Ridge(alpha=kfold.alpha_, fit_intercept=fit_intercept)
diff --git a/sklearn/metrics/classification.py b/sklearn/metrics/classification.py
index 315ba16d8e738..b8f5ae6b71d91 100644
--- a/sklearn/metrics/classification.py
+++ b/sklearn/metrics/classification.py
@@ -641,7 +641,8 @@ def jaccard_similarity_score(y_true, y_pred, normalize=True,
     warnings.warn('jaccard_similarity_score has been deprecated and replaced '
                   'with jaccard_score. It will be removed in version 0.23. '
                   'This implementation has surprising behavior for binary '
-                  'and multiclass classification tasks.', DeprecationWarning)
+                  'and multiclass classification tasks.',
+                  FutureWarning)
 
     # Compute accuracy for each possible representation
     y_type, y_true, y_pred = _check_targets(y_true, y_pred)
@@ -2132,7 +2133,7 @@ def hamming_loss(y_true, y_pred, labels=None, sample_weight=None):
         warnings.warn("The labels parameter is unused. It was"
                       " deprecated in version 0.21 and"
                       " will be removed in version 0.23",
-                      DeprecationWarning)
+                      FutureWarning)
 
     if sample_weight is None:
         weight_average = 1.
diff --git a/sklearn/metrics/cluster/tests/test_unsupervised.py b/sklearn/metrics/cluster/tests/test_unsupervised.py
index f36e8b7e6d7de..f8c97bc6bab49 100644
--- a/sklearn/metrics/cluster/tests/test_unsupervised.py
+++ b/sklearn/metrics/cluster/tests/test_unsupervised.py
@@ -225,7 +225,7 @@ def test_deprecated_calinski_harabaz_score():
     depr_message = ("Function 'calinski_harabaz_score' has been renamed "
                     "to 'calinski_harabasz_score' "
                     "and will be removed in version 0.23.")
-    assert_warns_message(DeprecationWarning, depr_message,
+    assert_warns_message(FutureWarning, depr_message,
                          calinski_harabaz_score,
                          np.ones((10, 2)), [0] * 5 + [1] * 5)
 
diff --git a/sklearn/metrics/scorer.py b/sklearn/metrics/scorer.py
index 25b826ff91f75..5cd5211c1f3c8 100644
--- a/sklearn/metrics/scorer.py
+++ b/sklearn/metrics/scorer.py
@@ -163,7 +163,7 @@ def __call__(self, estimator, X, y_true, sample_weight=None):
         """
         if self._deprecation_msg is not None:
             warnings.warn(self._deprecation_msg,
-                          category=DeprecationWarning,
+                          category=FutureWarning,
                           stacklevel=2)
         return self._score(partial(_cached_call, None), estimator, X, y_true,
                            sample_weight=sample_weight)
diff --git a/sklearn/metrics/tests/test_classification.py b/sklearn/metrics/tests/test_classification.py
index d3792b5f7fd86..3bafe9bfb4546 100644
--- a/sklearn/metrics/tests/test_classification.py
+++ b/sklearn/metrics/tests/test_classification.py
@@ -1141,7 +1141,7 @@ def test_multilabel_hamming_loss():
     assert hamming_loss(y1, np.zeros_like(y1), sample_weight=w) == 2. / 3
     # sp_hamming only works with 1-D arrays
     assert hamming_loss(y1[0], y2[0]) == sp_hamming(y1[0], y2[0])
-    assert_warns_message(DeprecationWarning,
+    assert_warns_message(FutureWarning,
                          "The labels parameter is unused. It was"
                          " deprecated in version 0.21 and"
                          " will be removed in version 0.23",
@@ -2212,7 +2212,8 @@ def test_multilabel_jaccard_similarity_score_deprecation():
     # size(y1 \inter y2) = [1, 2]
     # size(y1 \union y2) = [2, 2]
 
-    jss = partial(assert_warns, DeprecationWarning, jaccard_similarity_score)
+    jss = partial(assert_warns, FutureWarning,
+                  jaccard_similarity_score)
     assert jss(y1, y2) == 0.75
     assert jss(y1, y1) == 1
     assert jss(y2, y2) == 1
diff --git a/sklearn/metrics/tests/test_score_objects.py b/sklearn/metrics/tests/test_score_objects.py
index cfabed6d2c4ac..13d85faf5df2f 100644
--- a/sklearn/metrics/tests/test_score_objects.py
+++ b/sklearn/metrics/tests/test_score_objects.py
@@ -558,7 +558,7 @@ def test_deprecated_scorer():
     clf.fit(X_train, y_train)
 
     deprecated_scorer = get_scorer('brier_score_loss')
-    with pytest.warns(DeprecationWarning):
+    with pytest.warns(FutureWarning):
         deprecated_scorer(clf, X_test, y_test)
 
 
diff --git a/sklearn/model_selection/_search.py b/sklearn/model_selection/_search.py
index 02b31f7b9fb81..9f4a013d16ef5 100644
--- a/sklearn/model_selection/_search.py
+++ b/sklearn/model_selection/_search.py
@@ -818,7 +818,7 @@ def _store(key_name, array, weights=None, splits=False, rank=False):
         if self.iid != 'deprecated':
             warnings.warn(
                 "The parameter 'iid' is deprecated in 0.22 and will be "
-                "removed in 0.24.", DeprecationWarning
+                "removed in 0.24.", FutureWarning
             )
             iid = self.iid
         else:
diff --git a/sklearn/model_selection/_split.py b/sklearn/model_selection/_split.py
index 993694ae4ab4b..d66a0c965cd8b 100644
--- a/sklearn/model_selection/_split.py
+++ b/sklearn/model_selection/_split.py
@@ -2157,13 +2157,13 @@ def _build_repr(self):
         # catch deprecated param values.
         # This is set in utils/__init__.py but it gets overwritten
         # when running under python3 somehow.
-        warnings.simplefilter("always", DeprecationWarning)
+        warnings.simplefilter("always", FutureWarning)
         try:
             with warnings.catch_warnings(record=True) as w:
                 value = getattr(self, key, None)
                 if value is None and hasattr(self, 'cvargs'):
                     value = self.cvargs.get(key, None)
-            if len(w) and w[0].category == DeprecationWarning:
+            if len(w) and w[0].category == FutureWarning:
                 # if the parameter is deprecated, don't show it
                 continue
         finally:
diff --git a/sklearn/model_selection/tests/test_search.py b/sklearn/model_selection/tests/test_search.py
index f3301606e997e..7602b9cf76fb8 100644
--- a/sklearn/model_selection/tests/test_search.py
+++ b/sklearn/model_selection/tests/test_search.py
@@ -1693,7 +1693,7 @@ def _run_search(self, evaluate):
     results = mycv.cv_results_
     check_results(results, gscv)
     # TODO: remove in v0.24, the deprecation goes away then.
-    with pytest.warns(DeprecationWarning,
+    with pytest.warns(FutureWarning,
                       match="attribute is to be deprecated from version 0.22"):
         for attr in dir(gscv):
             if (attr[0].islower() and attr[-1:] == '_' and
@@ -1733,7 +1733,7 @@ def test_deprecated_grid_search_iid(iid):
     grid = GridSearchCV(
         SVC(random_state=0), param_grid={'C': [10]}, cv=3, iid=iid
     )
-    with pytest.warns(DeprecationWarning, match=depr_msg):
+    with pytest.warns(FutureWarning, match=depr_msg):
         grid.fit(X, y)
 
 
diff --git a/sklearn/model_selection/tests/test_split.py b/sklearn/model_selection/tests/test_split.py
index 12891c6004f90..85560f523979a 100644
--- a/sklearn/model_selection/tests/test_split.py
+++ b/sklearn/model_selection/tests/test_split.py
@@ -1421,7 +1421,7 @@ def test_group_kfold():
 
     # Check that each group appears only in 1 fold
     with warnings.catch_warnings():
-        warnings.simplefilter("ignore", DeprecationWarning)
+        warnings.simplefilter("ignore", FutureWarning)
         for group in np.unique(groups):
             assert len(np.unique(folds[groups == group])) == 1
 
diff --git a/sklearn/pipeline.py b/sklearn/pipeline.py
index c1f205446e47e..36069e91f8180 100644
--- a/sklearn/pipeline.py
+++ b/sklearn/pipeline.py
@@ -849,7 +849,7 @@ def _validate_transformers(self):
                 warnings.warn("Using None as a transformer is deprecated "
                               "in version 0.22 and will be removed in "
                               "version 0.24. Please use 'drop' instead.",
-                              DeprecationWarning)
+                              FutureWarning)
                 continue
             if t == 'drop':
                 continue
diff --git a/sklearn/svm/classes.py b/sklearn/svm/classes.py
index e55d53f2c32f1..83e667c12619c 100644
--- a/sklearn/svm/classes.py
+++ b/sklearn/svm/classes.py
@@ -223,7 +223,7 @@ def fit(self, X, y, sample_weight=None):
             old_loss = self.loss
             self.loss = {'l1': 'hinge', 'l2': 'squared_hinge'}.get(self.loss)
             warnings.warn(msg % (old_loss, self.loss, old_loss, '0.23'),
-                          DeprecationWarning)
+                          FutureWarning)
         # ---------------------------------------------------------------------
 
         if self.C < 0:
@@ -412,7 +412,7 @@ def fit(self, X, y, sample_weight=None):
                          'l2': 'squared_epsilon_insensitive'
                          }.get(self.loss)
             warnings.warn(msg % (old_loss, self.loss, old_loss, '0.23'),
-                          DeprecationWarning)
+                          FutureWarning)
         # ---------------------------------------------------------------------
 
         if self.C < 0:
diff --git a/sklearn/svm/tests/test_svm.py b/sklearn/svm/tests/test_svm.py
index c82092dd93e1d..2b1a2b13121fa 100644
--- a/sklearn/svm/tests/test_svm.py
+++ b/sklearn/svm/tests/test_svm.py
@@ -740,24 +740,24 @@ def test_linearsvx_loss_penalty_deprecations():
 
     # LinearSVC
     # loss l1 --> hinge
-    assert_warns_message(DeprecationWarning,
+    assert_warns_message(FutureWarning,
                          msg % ("l1", "hinge", "loss='l1'", "0.23"),
                          svm.LinearSVC(loss="l1").fit, X, y)
 
     # loss l2 --> squared_hinge
-    assert_warns_message(DeprecationWarning,
+    assert_warns_message(FutureWarning,
                          msg % ("l2", "squared_hinge", "loss='l2'", "0.23"),
                          svm.LinearSVC(loss="l2").fit, X, y)
 
     # LinearSVR
     # loss l1 --> epsilon_insensitive
-    assert_warns_message(DeprecationWarning,
+    assert_warns_message(FutureWarning,
                          msg % ("l1", "epsilon_insensitive", "loss='l1'",
                                 "0.23"),
                          svm.LinearSVR(loss="l1").fit, X, y)
 
     # loss l2 --> squared_epsilon_insensitive
-    assert_warns_message(DeprecationWarning,
+    assert_warns_message(FutureWarning,
                          msg % ("l2", "squared_epsilon_insensitive",
                                 "loss='l2'", "0.23"),
                          svm.LinearSVR(loss="l2").fit, X, y)
diff --git a/sklearn/tests/test_calibration.py b/sklearn/tests/test_calibration.py
index acac4c0471e0d..1444dab4793d2 100644
--- a/sklearn/tests/test_calibration.py
+++ b/sklearn/tests/test_calibration.py
@@ -320,7 +320,7 @@ def test_calibration_less_classes():
                                  proba[:, i + 1:]]))
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 @pytest.mark.parametrize('X', [np.random.RandomState(42).randn(15, 5, 2),
                                np.random.RandomState(42).randn(15, 5, 2, 6)])
 def test_calibration_accepts_ndarray(X):
diff --git a/sklearn/tests/test_common.py b/sklearn/tests/test_common.py
index 5e4d7ad540702..e3c827e87a673 100644
--- a/sklearn/tests/test_common.py
+++ b/sklearn/tests/test_common.py
@@ -91,7 +91,8 @@ def _tested_estimators():
 @parametrize_with_checks(_tested_estimators())
 def test_estimators(estimator, check):
     # Common tests for estimator instances
-    with ignore_warnings(category=(DeprecationWarning, ConvergenceWarning,
+    with ignore_warnings(category=(FutureWarning,
+                                   ConvergenceWarning,
                                    UserWarning, FutureWarning)):
         _set_checking_parameters(estimator)
         check(estimator)
@@ -119,7 +120,7 @@ def test_check_estimator_generate_only():
             check(estimator)
 
 
-@ignore_warnings(category=DeprecationWarning)
+@ignore_warnings(category=FutureWarning)
 # ignore deprecated open(.., 'U') in numpy distutils
 def test_configure():
     # Smoke test the 'configure' step of setup, this tests all the
diff --git a/sklearn/tests/test_docstring_parameters.py b/sklearn/tests/test_docstring_parameters.py
index a59ab5c7442dd..c61de9fd6b1aa 100644
--- a/sklearn/tests/test_docstring_parameters.py
+++ b/sklearn/tests/test_docstring_parameters.py
@@ -45,7 +45,8 @@
 
 # numpydoc 0.8.0's docscrape tool raises because of collections.abc under
 # Python 3.7
-@pytest.mark.filterwarnings('ignore::DeprecationWarning')
+@pytest.mark.filterwarnings(
+    'ignore::FutureWarning')
 @pytest.mark.skipif(IS_PYPY, reason='test segfaults on PyPy')
 def test_docstring_parameters():
     # Test module docstring formatting
@@ -125,7 +126,7 @@ def test_docstring_parameters():
         raise AssertionError("Docstring Error:\n" + msg)
 
 
-@ignore_warnings(category=DeprecationWarning)
+@ignore_warnings(category=FutureWarning)
 def test_tabs():
     # Test that there are no tabs in our source files
     for importer, modname, ispkg in walk_packages(sklearn.__path__,
diff --git a/sklearn/tests/test_dummy.py b/sklearn/tests/test_dummy.py
index 88b2d16fba46e..e5827a6751cff 100644
--- a/sklearn/tests/test_dummy.py
+++ b/sklearn/tests/test_dummy.py
@@ -761,6 +761,6 @@ def test_dtype_of_classifier_probas(strategy):
 def test_outputs_2d_deprecation(Dummy):
     X = [[1, 2]]
     y = [0]
-    with pytest.warns(DeprecationWarning,
+    with pytest.warns(FutureWarning,
                       match="will be removed in version 0.24"):
         Dummy().fit(X, y).outputs_2d_
diff --git a/sklearn/tests/test_import_deprecations.py b/sklearn/tests/test_import_deprecations.py
index a855aeaf54126..c3d1ca2a07326 100644
--- a/sklearn/tests/test_import_deprecations.py
+++ b/sklearn/tests/test_import_deprecations.py
@@ -49,7 +49,7 @@ def test_import_is_deprecated(deprecated_path, importee):
     script = """
     import pytest
 
-    with pytest.warns(DeprecationWarning,
+    with pytest.warns(FutureWarning,
                       match="{expected_message}"):
         from {deprecated_path} import {importee}
     """.format(
diff --git a/sklearn/tests/test_pipeline.py b/sklearn/tests/test_pipeline.py
index 896d829775b81..10050ad66f38f 100644
--- a/sklearn/tests/test_pipeline.py
+++ b/sklearn/tests/test_pipeline.py
@@ -1188,10 +1188,10 @@ def transform(self, X, y=None):
 def test_feature_union_warns_with_none():
     msg = (r"Using None as a transformer is deprecated in version 0\.22 and "
            r"will be removed in version 0\.24\. Please use 'drop' instead\.")
-    with pytest.warns(DeprecationWarning, match=msg):
+    with pytest.warns(FutureWarning, match=msg):
         union = FeatureUnion([('multi1', None), ('multi2', Mult())])
 
     X = [[1, 2, 3], [4, 5, 6]]
 
-    with pytest.warns(DeprecationWarning, match=msg):
+    with pytest.warns(FutureWarning, match=msg):
         union.fit_transform(X)
diff --git a/sklearn/tree/tests/test_tree.py b/sklearn/tree/tests/test_tree.py
index 193b459b93b38..00e389914d4dd 100644
--- a/sklearn/tree/tests/test_tree.py
+++ b/sklearn/tree/tests/test_tree.py
@@ -526,7 +526,7 @@ def test_error():
         with pytest.raises(ValueError):
             TreeEstimator(max_features=42).fit(X, y)
         # min_impurity_split warning
-        with ignore_warnings(category=DeprecationWarning):
+        with ignore_warnings(category=FutureWarning):
             with pytest.raises(ValueError):
                 TreeEstimator(min_impurity_split=-1.0).fit(X, y)
         with pytest.raises(ValueError):
@@ -807,7 +807,7 @@ def test_min_impurity_split():
             "Failed, min_impurity_split = {0} > 1e-7".format(
                 est.min_impurity_split))
         try:
-            assert_warns(DeprecationWarning, est.fit, X, y)
+            assert_warns(FutureWarning, est.fit, X, y)
         except AssertionError:
             pass
         for node in range(est.tree_.node_count):
@@ -823,7 +823,7 @@ def test_min_impurity_split():
         est = TreeEstimator(max_leaf_nodes=max_leaf_nodes,
                             min_impurity_split=min_impurity_split,
                             random_state=0)
-        assert_warns_message(DeprecationWarning,
+        assert_warns_message(FutureWarning,
                              "Use the min_impurity_decrease",
                              est.fit, X, y)
         for node in range(est.tree_.node_count):
@@ -1623,7 +1623,7 @@ def test_presort_deprecated(Cls, presort):
     X = np.zeros((10, 10))
     y = np.r_[[0] * 5, [1] * 5]
     tree = Cls(presort=presort)
-    with pytest.warns(DeprecationWarning,
+    with pytest.warns(FutureWarning,
                       match="The parameter 'presort' is deprecated "):
         tree.fit(X, y)
 
@@ -1957,9 +1957,9 @@ def test_classes_deprecated():
     match = ("attribute is to be deprecated from version "
              "0.22 and will be removed in 0.24.")
 
-    with pytest.warns(DeprecationWarning, match=match):
+    with pytest.warns(FutureWarning, match=match):
         n = len(clf.classes_)
         assert n == clf.n_outputs_
 
-    with pytest.warns(DeprecationWarning, match=match):
+    with pytest.warns(FutureWarning, match=match):
         assert len(clf.n_classes_) == clf.n_outputs_
diff --git a/sklearn/tree/tree.py b/sklearn/tree/tree.py
index d88bc5830359b..a994f176a2eda 100644
--- a/sklearn/tree/tree.py
+++ b/sklearn/tree/tree.py
@@ -298,7 +298,7 @@ def fit(self, X, y, sample_weight=None, check_input=True,
                           "Its default value will change from 1e-7 to 0 in "
                           "version 0.23, and it will be removed in 0.25. "
                           "Use the min_impurity_decrease parameter instead.",
-                          DeprecationWarning)
+                          FutureWarning)
             min_impurity_split = self.min_impurity_split
         else:
             min_impurity_split = 1e-7
@@ -315,7 +315,8 @@ def fit(self, X, y, sample_weight=None, check_input=True,
             warnings.warn("The parameter 'presort' is deprecated and has no "
                           "effect. It will be removed in v0.24. You can "
                           "suppress this warning by not passing any value "
-                          "to the 'presort' parameter.", DeprecationWarning)
+                          "to the 'presort' parameter.",
+                          FutureWarning)
 
         # Build tree
         criterion = self.criterion
@@ -1228,7 +1229,7 @@ def classes_(self):
         # TODO: Remove method in 0.24
         msg = ("the classes_ attribute is to be deprecated from version "
                "0.22 and will be removed in 0.24.")
-        warnings.warn(msg, DeprecationWarning)
+        warnings.warn(msg, FutureWarning)
         return np.array([None] * self.n_outputs_)
 
     @property
@@ -1236,7 +1237,7 @@ def n_classes_(self):
         # TODO: Remove method in 0.24
         msg = ("the n_classes_ attribute is to be deprecated from version "
                "0.22 and will be removed in 0.24.")
-        warnings.warn(msg, DeprecationWarning)
+        warnings.warn(msg, FutureWarning)
         return np.array([1] * self.n_outputs_, dtype=np.intp)
 
 
diff --git a/sklearn/utils/deprecation.py b/sklearn/utils/deprecation.py
index 1e7a512c4c63f..32033f0748c2d 100644
--- a/sklearn/utils/deprecation.py
+++ b/sklearn/utils/deprecation.py
@@ -2,6 +2,7 @@
 import functools
 import sys
 
+
 __all__ = ["deprecated"]
 
 
@@ -64,7 +65,7 @@ def _decorate_class(self, cls):
         init = cls.__init__
 
         def wrapped(*args, **kwargs):
-            warnings.warn(msg, category=DeprecationWarning)
+            warnings.warn(msg, category=FutureWarning)
             return init(*args, **kwargs)
         cls.__init__ = wrapped
 
@@ -83,7 +84,7 @@ def _decorate_fun(self, fun):
 
         @functools.wraps(fun)
         def wrapped(*args, **kwargs):
-            warnings.warn(msg, category=DeprecationWarning)
+            warnings.warn(msg, category=FutureWarning)
             return fun(*args, **kwargs)
 
         wrapped.__doc__ = self._update_doc(wrapped.__doc__)
@@ -98,7 +99,7 @@ def _decorate_property(self, prop):
 
         @property
         def wrapped(*args, **kwargs):
-            warnings.warn(msg, category=DeprecationWarning)
+            warnings.warn(msg, category=FutureWarning)
             return prop.fget(*args, **kwargs)
 
         return wrapped
@@ -129,8 +130,9 @@ def _raise_dep_warning_if_not_pytest(deprecated_path, correct_path):
     # Useful because we are now deprecating # anything that isn't explicitly
     # in an __init__ file.
     # We don't want to raise a dep warning if we are in a pytest session else
-    # the CIs with -Werror::DeprecationWarning would fail. The deprecations are
-    # still properly tested in sklearn/tests/test_import_deprecations.py
+    # the CIs with -Werror::FutureWarning would
+    # fail. The deprecations are still properly tested in
+    # sklearn/tests/test_import_deprecations.py
 
     # TODO: remove in 0.24 since this shouldn't be needed anymore.
 
@@ -144,4 +146,4 @@ def _raise_dep_warning_if_not_pytest(deprecated_path, correct_path):
     ).format(deprecated_path=deprecated_path, correct_path=correct_path)
 
     if not getattr(sys, '_is_pytest_session', False):
-        warnings.warn(message, DeprecationWarning)
+        warnings.warn(message, FutureWarning)
diff --git a/sklearn/utils/estimator_checks.py b/sklearn/utils/estimator_checks.py
index 552f1d243dcc3..7e3f86e4284c8 100644
--- a/sklearn/utils/estimator_checks.py
+++ b/sklearn/utils/estimator_checks.py
@@ -143,7 +143,7 @@ def _yield_classifier_checks(name, classifier):
     yield check_decision_proba_consistency
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_supervised_y_no_nan(name, estimator_orig):
     # Checks that the Estimator targets are not NaN.
     estimator = clone(estimator_orig)
@@ -646,18 +646,20 @@ def check_estimator_sparse_data(name, estimator_orig):
     else:
         y = (4 * rng.rand(40)).astype(np.int)
     # catch deprecation warnings
-    with ignore_warnings(category=DeprecationWarning):
+    with ignore_warnings(category=FutureWarning):
         estimator = clone(estimator_orig)
     y = _enforce_estimator_tags_y(estimator, y)
     for matrix_format, X in _generate_sparse_matrix(X_csr):
         # catch deprecation warnings
-        with ignore_warnings(category=(DeprecationWarning, FutureWarning)):
+        with ignore_warnings(category=(FutureWarning,
+                                       FutureWarning)):
             estimator = clone(estimator_orig)
             if name in ['Scaler', 'StandardScaler']:
                 estimator.set_params(with_mean=False)
         # fit and predict
         try:
-            with ignore_warnings(category=(DeprecationWarning, FutureWarning)):
+            with ignore_warnings(category=(FutureWarning,
+                                           FutureWarning)):
                 estimator.fit(X, y)
             if hasattr(estimator, "predict"):
                 pred = estimator.predict(X)
@@ -692,7 +694,7 @@ def check_estimator_sparse_data(name, estimator_orig):
             raise
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_sample_weights_pandas_series(name, estimator_orig):
     # check that estimators will accept a 'sample_weight' parameter of
     # type pandas.Series in the 'fit' function.
@@ -719,7 +721,7 @@ def check_sample_weights_pandas_series(name, estimator_orig):
                            "input of type pandas.Series to class weight.")
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_sample_weights_list(name, estimator_orig):
     # check that estimators will accept a 'sample_weight' parameter of
     # type list in the 'fit' function.
@@ -739,7 +741,7 @@ def check_sample_weights_list(name, estimator_orig):
         estimator.fit(X, y, sample_weight=sample_weight)
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_sample_weights_invariance(name, estimator_orig):
     # check that the estimators yield same results for
     # unit weights and no weights
@@ -777,7 +779,8 @@ def check_sample_weights_invariance(name, estimator_orig):
                                         % name)
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning, UserWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning,
+                           UserWarning))
 def check_dtype_object(name, estimator_orig):
     # check that estimators treat dtype object as numeric if possible
     rng = np.random.RandomState(0)
@@ -876,7 +879,7 @@ def _is_public_parameter(attr):
     return not (attr.startswith('_') or attr.endswith('_'))
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_dont_overwrite_parameters(name, estimator_orig):
     # check that fit method only changes or sets private attributes
     if hasattr(estimator_orig.__init__, "deprecated_original"):
@@ -931,7 +934,7 @@ def check_dont_overwrite_parameters(name, estimator_orig):
             % ', '.join(attrs_changed_by_fit))
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_fit2d_predict1d(name, estimator_orig):
     # check by fitting a 2d array and predicting with a 1d array
     rnd = np.random.RandomState(0)
@@ -981,7 +984,7 @@ def _apply_on_subsets(func, X):
     return np.ravel(result_full), np.ravel(result_by_batch)
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_methods_subset_invariance(name, estimator_orig):
     # check that method gives invariant results if applied
     # on mini batches or the whole set
@@ -1112,7 +1115,7 @@ def check_fit1d(name, estimator_orig):
     assert_raises(ValueError, estimator.fit, X, y)
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_transformer_general(name, transformer, readonly_memmap=False):
     X, y = make_blobs(n_samples=30, centers=[[0, 0, 0], [1, 1, 1]],
                       random_state=0, n_features=2, cluster_std=0.1)
@@ -1126,7 +1129,7 @@ def check_transformer_general(name, transformer, readonly_memmap=False):
     _check_transformer(name, transformer, X, y)
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_transformer_data_not_an_array(name, transformer):
     X, y = make_blobs(n_samples=30, centers=[[0, 0, 0], [1, 1, 1]],
                       random_state=0, n_features=2, cluster_std=0.1)
@@ -1142,7 +1145,7 @@ def check_transformer_data_not_an_array(name, transformer):
     _check_transformer(name, transformer, X.tolist(), y.tolist())
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_transformers_unfitted(name, transformer):
     X, y = _boston_subset()
 
@@ -1316,7 +1319,7 @@ def check_estimators_dtypes(name, estimator_orig):
                 getattr(estimator, method)(X_train)
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_estimators_empty_data_messages(name, estimator_orig):
     e = clone(estimator_orig)
     set_random_state(e, 1)
@@ -1339,7 +1342,7 @@ def check_estimators_empty_data_messages(name, estimator_orig):
     assert_raises_regex(ValueError, msg, e.fit, X_zero_features, y)
 
 
-@ignore_warnings(category=DeprecationWarning)
+@ignore_warnings(category=FutureWarning)
 def check_estimators_nan_inf(name, estimator_orig):
     # Checks that Estimator X's do not contain NaN or inf.
     rnd = np.random.RandomState(0)
@@ -1359,7 +1362,8 @@ def check_estimators_nan_inf(name, estimator_orig):
                               " transform.")
     for X_train in [X_train_nan, X_train_inf]:
         # catch deprecation warnings
-        with ignore_warnings(category=(DeprecationWarning, FutureWarning)):
+        with ignore_warnings(category=(FutureWarning,
+                                       FutureWarning)):
             estimator = clone(estimator_orig)
             set_random_state(estimator, 1)
             # try to fit
@@ -1472,7 +1476,7 @@ def check_estimators_pickle(name, estimator_orig):
         assert_allclose_dense_sparse(result[method], unpickled_result)
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_estimators_partial_fit_n_features(name, estimator_orig):
     # check if number of features changes between calls to partial_fit.
     if not hasattr(estimator_orig, 'partial_fit'):
@@ -1498,7 +1502,7 @@ def check_estimators_partial_fit_n_features(name, estimator_orig):
         estimator.partial_fit(X[:, :-1], y)
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_classifier_multioutput(name, estimator):
     n_samples, n_labels, n_classes = 42, 5, 3
     tags = _safe_tags(estimator)
@@ -1556,7 +1560,7 @@ def check_classifier_multioutput(name, estimator):
             assert_array_equal(rankdata(y_proba), rankdata(y_decision[:, i]))
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_regressor_multioutput(name, estimator):
     estimator = clone(estimator)
     n_samples = n_features = 10
@@ -1579,7 +1583,7 @@ def check_regressor_multioutput(name, estimator):
         " Expected {}, got {}.")
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_clustering(name, clusterer_orig, readonly_memmap=False):
     clusterer = clone(clusterer_orig)
     X, y = make_blobs(n_samples=50, random_state=1)
@@ -1638,7 +1642,7 @@ def check_clustering(name, clusterer_orig, readonly_memmap=False):
     # else labels should be less than max(labels_) which is necessarily true
 
 
-@ignore_warnings(category=DeprecationWarning)
+@ignore_warnings(category=FutureWarning)
 def check_clusterer_compute_labels_predict(name, clusterer_orig):
     """Check that predict is invariant of compute_labels"""
     X, y = make_blobs(n_samples=20, random_state=0)
@@ -1653,7 +1657,7 @@ def check_clusterer_compute_labels_predict(name, clusterer_orig):
         assert_array_equal(X_pred1, X_pred2)
 
 
-@ignore_warnings(category=DeprecationWarning)
+@ignore_warnings(category=FutureWarning)
 def check_classifiers_one_label(name, classifier_orig):
     error_string_fit = "Classifier can't train when only one class is present."
     error_string_predict = ("Classifier can't predict when only one class is "
@@ -1663,7 +1667,7 @@ def check_classifiers_one_label(name, classifier_orig):
     X_test = rnd.uniform(size=(10, 3))
     y = np.ones(10)
     # catch deprecation warnings
-    with ignore_warnings(category=(DeprecationWarning, FutureWarning)):
+    with ignore_warnings(category=(FutureWarning, FutureWarning)):
         classifier = clone(classifier_orig)
         # try to fit
         try:
@@ -1906,7 +1910,7 @@ def check_outliers_train(name, estimator_orig, readonly_memmap=True):
             assert_raises(ValueError, estimator.fit, X)
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_estimators_fit_returns_self(name, estimator_orig,
                                       readonly_memmap=False):
     """Check if self is returned when calling fit"""
@@ -1945,7 +1949,7 @@ def check_estimators_unfitted(name, estimator_orig):
             assert_raises(NotFittedError, getattr(estimator, method), X)
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_supervised_y_2d(name, estimator_orig):
     tags = _safe_tags(estimator_orig)
     if tags['multioutput_only']:
@@ -2077,7 +2081,7 @@ def check_classifiers_classes(name, classifier_orig):
     check_classifiers_predictions(X_binary, y_binary, name, classifier_orig)
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_regressors_int(name, regressor_orig):
     X, _ = _boston_subset()
     X = _pairwise_estimator_convert_X(X[:50], regressor_orig)
@@ -2105,7 +2109,7 @@ def check_regressors_int(name, regressor_orig):
     assert_allclose(pred1, pred2, atol=1e-2, err_msg=name)
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_regressors_train(name, regressor_orig, readonly_memmap=False):
     X, y = _boston_subset()
     X = _pairwise_estimator_convert_X(X, regressor_orig)
@@ -2173,10 +2177,10 @@ def check_regressors_no_decision_function(name, regressor_orig):
             continue
         # has function. Should raise deprecation warning
         msg = func_name
-        assert_warns_message(DeprecationWarning, msg, func, X)
+        assert_warns_message(FutureWarning, msg, func, X)
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_class_weight_classifiers(name, classifier_orig):
     if name == "NuSVC":
         # the sparse version has a parameter that doesn't do anything
@@ -2228,7 +2232,7 @@ def check_class_weight_classifiers(name, classifier_orig):
         assert np.mean(y_pred == 0) > 0.87
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_class_weight_balanced_classifiers(name, classifier_orig, X_train,
                                             y_train, X_test, y_test, weights):
     classifier = clone(classifier_orig)
@@ -2245,10 +2249,10 @@ def check_class_weight_balanced_classifiers(name, classifier_orig, X_train,
     classifier.fit(X_train, y_train)
     y_pred_balanced = classifier.predict(X_test)
     assert (f1_score(y_test, y_pred_balanced, average='weighted') >
-                   f1_score(y_test, y_pred, average='weighted'))
+            f1_score(y_test, y_pred, average='weighted'))
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_class_weight_balanced_linear_classifier(name, Classifier):
     """Test class weights with non-contiguous class labels."""
     # this is run on classes, not instances, though this should be changed
@@ -2287,7 +2291,7 @@ def check_class_weight_balanced_linear_classifier(name, Classifier):
                     % name)
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_estimators_overwrite_params(name, estimator_orig):
     if _safe_tags(estimator_orig, 'binary_only'):
         n_centers = 2
@@ -2326,7 +2330,7 @@ def check_estimators_overwrite_params(name, estimator_orig):
             % (name, param_name, original_value, new_value))
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_no_attributes_set_in_init(name, estimator_orig):
     """Check setting during init. """
     estimator = clone(estimator_orig)
@@ -2360,7 +2364,7 @@ def check_no_attributes_set_in_init(name, estimator_orig):
             % (name, sorted(invalid_attr)))
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_sparsify_coefficients(name, estimator_orig):
     X = np.array([[-2, -1], [-1, -1], [-1, -2], [1, 1], [1, 2], [2, 1],
                   [-1, -2], [2, 2], [-2, -2]])
@@ -2383,7 +2387,7 @@ def check_sparsify_coefficients(name, estimator_orig):
     assert_array_equal(pred, pred_orig)
 
 
-@ignore_warnings(category=DeprecationWarning)
+@ignore_warnings(category=FutureWarning)
 def check_classifier_data_not_an_array(name, estimator_orig):
     X = np.array([[3, 0], [0, 1], [0, 2], [1, 1], [1, 2], [2, 1],
                   [0, 3], [1, 0], [2, 0], [4, 4], [2, 3], [3, 2]])
@@ -2393,7 +2397,7 @@ def check_classifier_data_not_an_array(name, estimator_orig):
     check_estimators_data_not_an_array(name, estimator_orig, X, y)
 
 
-@ignore_warnings(category=DeprecationWarning)
+@ignore_warnings(category=FutureWarning)
 def check_regressor_data_not_an_array(name, estimator_orig):
     X, y = _boston_subset(n_samples=50)
     X = _pairwise_estimator_convert_X(X, estimator_orig)
@@ -2401,7 +2405,7 @@ def check_regressor_data_not_an_array(name, estimator_orig):
     check_estimators_data_not_an_array(name, estimator_orig, X, y)
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_estimators_data_not_an_array(name, estimator_orig, X, y):
     if name in CROSS_DECOMPOSITION:
         raise SkipTest("Skipping check_estimators_data_not_an_array "
@@ -2428,7 +2432,7 @@ def check_parameters_default_constructible(name, Estimator):
     # this check works on classes, not instances
     # test default-constructibility
     # get rid of deprecation warnings
-    with ignore_warnings(category=(DeprecationWarning, FutureWarning)):
+    with ignore_warnings(category=(FutureWarning, FutureWarning)):
         estimator = _construct_instance(Estimator)
         # test cloning
         clone(estimator)
@@ -2512,7 +2516,7 @@ def _enforce_estimator_tags_y(estimator, y):
     return y
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_non_transformer_estimators_n_iter(name, estimator_orig):
     # Test that estimators that are not transformers with a parameter
     # max_iter, return the attribute of n_iter_ at least 1.
@@ -2546,7 +2550,7 @@ def check_non_transformer_estimators_n_iter(name, estimator_orig):
         assert estimator.n_iter_ >= 1
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_transformer_n_iter(name, estimator_orig):
     # Test that transformers with a parameter max_iter, return the
     # attribute of n_iter_ at least 1.
@@ -2572,7 +2576,7 @@ def check_transformer_n_iter(name, estimator_orig):
             assert estimator.n_iter_ >= 1
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_get_params_invariance(name, estimator_orig):
     # Checks if get_params(deep=False) is a subset of get_params(deep=True)
     e = clone(estimator_orig)
@@ -2584,7 +2588,7 @@ def check_get_params_invariance(name, estimator_orig):
                shallow_params.items())
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_set_params(name, estimator_orig):
     # Check that get_params() returns the same thing
     # before and after set_params() with some fuzz
@@ -2638,7 +2642,7 @@ def check_set_params(name, estimator_orig):
         test_params[param_name] = default_value
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_classifiers_regression_target(name, estimator_orig):
     # Check if classifier throws an exception when fed regression targets
 
@@ -2649,7 +2653,7 @@ def check_classifiers_regression_target(name, estimator_orig):
         assert_raises_regex(ValueError, msg, e.fit, X, y)
 
 
-@ignore_warnings(category=(DeprecationWarning, FutureWarning))
+@ignore_warnings(category=(FutureWarning, FutureWarning))
 def check_decision_proba_consistency(name, estimator_orig):
     # Check whether an estimator having both decision_function and
     # predict_proba methods has outputs with perfect rank correlation.
diff --git a/sklearn/utils/linear_assignment_.py b/sklearn/utils/linear_assignment_.py
index dd4981dbd1deb..b396d90fb27bc 100644
--- a/sklearn/utils/linear_assignment_.py
+++ b/sklearn/utils/linear_assignment_.py
@@ -13,12 +13,13 @@
 import numpy as np
 import warnings
 
+
 # Deprecation warning for module
 warnings.warn(
     "The linear_assignment_ module is deprecated in 0.21 "
     "and will be removed from 0.23. Use "
     "scipy.optimize.linear_sum_assignment instead.",
-    DeprecationWarning)
+    FutureWarning)
 
 
 def linear_assignment(X):
@@ -124,7 +125,7 @@ def _hungarian(cost_matrix):
         "The linear_assignment function is deprecated in 0.21 "
         "and will be removed from 0.23. Use "
         "scipy.optimize.linear_sum_assignment instead.",
-        DeprecationWarning)
+        FutureWarning)
 
     state = _HungarianState(cost_matrix)
 
diff --git a/sklearn/utils/testing.py b/sklearn/utils/testing.py
index 4c11149962dfd..0f7bd2be02e68 100644
--- a/sklearn/utils/testing.py
+++ b/sklearn/utils/testing.py
@@ -51,6 +51,7 @@
 from sklearn.utils import deprecated, IS_PYPY, _IS_32BIT
 from sklearn.utils._unittest_backport import TestCase
 
+
 __all__ = ["assert_equal", "assert_not_equal", "assert_raises",
            "assert_raises_regexp", "assert_true",
            "assert_false", "assert_almost_equal", "assert_array_equal",
@@ -121,7 +122,7 @@ def assert_warns(warning_class, func, *args, **kw):
         warnings.simplefilter("always")
         # Trigger a warning.
         result = func(*args, **kw)
-        if hasattr(np, 'VisibleDeprecationWarning'):
+        if hasattr(np, 'FutureWarning'):
             # Filter out numpy-specific warnings in numpy >= 1.9
             w = [e for e in w
                  if e.category is not np.VisibleDeprecationWarning]
@@ -167,7 +168,7 @@ def assert_warns_message(warning_class, message, func, *args, **kw):
     with warnings.catch_warnings(record=True) as w:
         # Cause all warnings to always be triggered.
         warnings.simplefilter("always")
-        if hasattr(np, 'VisibleDeprecationWarning'):
+        if hasattr(np, 'FutureWarning'):
             # Let's not catch the numpy internal DeprecationWarnings
             warnings.simplefilter('ignore', np.VisibleDeprecationWarning)
         # Trigger a warning.
@@ -243,7 +244,7 @@ def assert_no_warnings(func, *args, **kw):
         warnings.simplefilter('always')
 
         result = func(*args, **kw)
-        if hasattr(np, 'VisibleDeprecationWarning'):
+        if hasattr(np, 'FutureWarning'):
             # Filter out numpy-specific warnings in numpy >= 1.9
             w = [e for e in w
                  if e.category is not np.VisibleDeprecationWarning]
@@ -492,17 +493,17 @@ def is_abstract(c):
     if include_other is not None:
         warnings.warn("include_other was deprecated in version 0.21,"
                       " has no effect and will be removed in 0.23",
-                      DeprecationWarning)
+                      FutureWarning)
 
     if include_dont_test is not None:
         warnings.warn("include_dont_test was deprecated in version 0.21,"
                       " has no effect and will be removed in 0.23",
-                      DeprecationWarning)
+                      FutureWarning)
 
     if include_meta_estimators is not None:
         warnings.warn("include_meta_estimators was deprecated in version 0.21,"
                       " has no effect and will be removed in 0.23",
-                      DeprecationWarning)
+                      FutureWarning)
 
     all_classes = []
     # get parent folder
@@ -515,7 +516,7 @@ def is_abstract(c):
                         'feature_extraction._hashing' in modname):
             continue
         # Ignore deprecation warnings triggered at import time.
-        with ignore_warnings(category=DeprecationWarning):
+        with ignore_warnings(category=FutureWarning):
             module = __import__(modname, fromlist="dummy")
         classes = inspect.getmembers(module, inspect.isclass)
         all_classes.extend(classes)
diff --git a/sklearn/utils/tests/test_deprecated_utils.py b/sklearn/utils/tests/test_deprecated_utils.py
index 472182a6b348a..da41e7e44ddb3 100644
--- a/sklearn/utils/tests/test_deprecated_utils.py
+++ b/sklearn/utils/tests/test_deprecated_utils.py
@@ -18,37 +18,43 @@
 
 # TODO: remove in 0.24
 def test_choose_check_classifiers_labels_deprecated():
-    with pytest.warns(DeprecationWarning, match="removed in version 0.24"):
+    with pytest.warns(FutureWarning,
+                      match="removed in version 0.24"):
         choose_check_classifiers_labels(None, None, None)
 
 
 # TODO: remove in 0.24
 def test_enforce_estimator_tags_y():
-    with pytest.warns(DeprecationWarning, match="removed in version 0.24"):
+    with pytest.warns(FutureWarning,
+                      match="removed in version 0.24"):
         enforce_estimator_tags_y(DummyClassifier(), np.array([0, 1]))
 
 
 # TODO: remove in 0.24
 def test_notanarray():
-    with pytest.warns(DeprecationWarning, match="removed in version 0.24"):
+    with pytest.warns(FutureWarning,
+                      match="removed in version 0.24"):
         NotAnArray([1, 2])
 
 
 # TODO: remove in 0.24
 def test_is_public_parameter():
-    with pytest.warns(DeprecationWarning, match="removed in version 0.24"):
+    with pytest.warns(FutureWarning,
+                      match="removed in version 0.24"):
         is_public_parameter('hello')
 
 
 # TODO: remove in 0.24
 def test_pairwise_estimator_convert_X():
-    with pytest.warns(DeprecationWarning, match="removed in version 0.24"):
+    with pytest.warns(FutureWarning,
+                      match="removed in version 0.24"):
         pairwise_estimator_convert_X([[1, 2]], DummyClassifier())
 
 
 # TODO: remove in 0.24
 def test_set_checking_parameters():
-    with pytest.warns(DeprecationWarning, match="removed in version 0.24"):
+    with pytest.warns(FutureWarning,
+                      match="removed in version 0.24"):
         set_checking_parameters(DummyClassifier())
 
 
@@ -71,17 +77,20 @@ def hess(x, p):
     def grad_hess(x):
         return grad(x), lambda x: A.T.dot(A.dot(x))
 
-    with pytest.warns(DeprecationWarning, match="removed in version 0.24"):
+    with pytest.warns(FutureWarning,
+                      match="removed in version 0.24"):
         newton_cg(grad_hess, func, grad, x0)
 
 
 # TODO: remove in 0.24
 def test_random_choice_csc():
-    with pytest.warns(DeprecationWarning, match="removed in version 0.24"):
+    with pytest.warns(FutureWarning,
+                      match="removed in version 0.24"):
         random_choice_csc(10, [[2]])
 
 
 # TODO: remove in 0.24
 def test_safe_indexing():
-    with pytest.warns(DeprecationWarning, match="removed in version 0.24"):
+    with pytest.warns(FutureWarning,
+                      match="removed in version 0.24"):
         safe_indexing([1, 2], 0)
diff --git a/sklearn/utils/tests/test_deprecation.py b/sklearn/utils/tests/test_deprecation.py
index c8d8484d71bc4..5019dce9a5dc4 100644
--- a/sklearn/utils/tests/test_deprecation.py
+++ b/sklearn/utils/tests/test_deprecation.py
@@ -36,11 +36,12 @@ def mock_function():
 
 
 def test_deprecated():
-    assert_warns_message(DeprecationWarning, 'qwerty', MockClass1)
-    assert_warns_message(DeprecationWarning, 'mockclass2_method',
+    assert_warns_message(FutureWarning, 'qwerty', MockClass1)
+    assert_warns_message(FutureWarning, 'mockclass2_method',
                          MockClass2().method)
-    assert_warns_message(DeprecationWarning, 'deprecated', MockClass3)
-    val = assert_warns_message(DeprecationWarning, 'deprecated', mock_function)
+    assert_warns_message(FutureWarning, 'deprecated', MockClass3)
+    val = assert_warns_message(FutureWarning, 'deprecated',
+                               mock_function)
     assert val == 10
 
 
diff --git a/sklearn/utils/tests/test_estimator_checks.py b/sklearn/utils/tests/test_estimator_checks.py
index c7ff23c386567..b7cc61537380f 100644
--- a/sklearn/utils/tests/test_estimator_checks.py
+++ b/sklearn/utils/tests/test_estimator_checks.py
@@ -451,7 +451,8 @@ def test_check_estimator_clones():
     for Estimator in [GaussianMixture, LinearRegression,
                       RandomForestClassifier, NMF, SGDClassifier,
                       MiniBatchKMeans]:
-        with ignore_warnings(category=(FutureWarning, DeprecationWarning)):
+        with ignore_warnings(category=(FutureWarning,
+                                       FutureWarning)):
             # when 'est = SGDClassifier()'
             est = Estimator()
             _set_checking_parameters(est)
@@ -461,7 +462,8 @@ def test_check_estimator_clones():
             check_estimator(est)
         assert old_hash == joblib.hash(est)
 
-        with ignore_warnings(category=(FutureWarning, DeprecationWarning)):
+        with ignore_warnings(category=(FutureWarning,
+                                       FutureWarning)):
             # when 'est = SGDClassifier()'
             est = Estimator()
             _set_checking_parameters(est)
diff --git a/sklearn/utils/tests/test_extmath.py b/sklearn/utils/tests/test_extmath.py
index fd3ba0b9f74c0..50be58689ea7b 100644
--- a/sklearn/utils/tests/test_extmath.py
+++ b/sklearn/utils/tests/test_extmath.py
@@ -648,7 +648,7 @@ def test_stable_cumsum():
 def test_safe_min():
     msg = ("safe_min is deprecated in version 0.22 and will be removed "
            "in version 0.24.")
-    with pytest.warns(DeprecationWarning, match=msg):
+    with pytest.warns(FutureWarning, match=msg):
         safe_min(np.ones(10))
 
 
diff --git a/sklearn/utils/tests/test_linear_assignment.py b/sklearn/utils/tests/test_linear_assignment.py
index 2dbe2ada2f825..2f9399e68606c 100644
--- a/sklearn/utils/tests/test_linear_assignment.py
+++ b/sklearn/utils/tests/test_linear_assignment.py
@@ -8,7 +8,8 @@
 import pytest
 
 
-@pytest.mark.filterwarnings("ignore::DeprecationWarning")
+@pytest.mark.filterwarnings(
+  "ignore::FutureWarning")
 def test_hungarian():
     from sklearn.utils.linear_assignment_ import _hungarian
     matrices = [
diff --git a/sklearn/utils/tests/test_testing.py b/sklearn/utils/tests/test_testing.py
index aac689fb2dc80..3a3e9ad3696c1 100644
--- a/sklearn/utils/tests/test_testing.py
+++ b/sklearn/utils/tests/test_testing.py
@@ -39,26 +39,30 @@
 from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
 
 
-@pytest.mark.filterwarnings("ignore", category=DeprecationWarning)  # 0.24
+@pytest.mark.filterwarnings("ignore",
+                            category=FutureWarning)  # 0.24
 def test_assert_less():
     assert 0 < 1
     assert_raises(AssertionError, assert_less, 1, 0)
 
 
-@pytest.mark.filterwarnings("ignore", category=DeprecationWarning)  # 0.24
+@pytest.mark.filterwarnings("ignore",
+                            category=FutureWarning)  # 0.24
 def test_assert_greater():
     assert 1 > 0
     assert_raises(AssertionError, assert_greater, 0, 1)
 
 
-@pytest.mark.filterwarnings("ignore", category=DeprecationWarning)  # 0.24
+@pytest.mark.filterwarnings("ignore",
+                            category=FutureWarning)  # 0.24
 def test_assert_less_equal():
     assert 0 <= 1
     assert 1 <= 1
     assert_raises(AssertionError, assert_less_equal, 1, 0)
 
 
-@pytest.mark.filterwarnings("ignore", category=DeprecationWarning)  # 0.24
+@pytest.mark.filterwarnings("ignore",
+                            category=FutureWarning)  # 0.24
 def test_assert_greater_equal():
     assert 1 >= 0
     assert 1 >= 1
@@ -146,7 +150,7 @@ def _multiple_warning_function():
                                                      category=UserWarning))
     assert_warns(UserWarning,
                  ignore_warnings(_multiple_warning_function,
-                                 category=DeprecationWarning))
+                                 category=FutureWarning))
     assert_warns(DeprecationWarning,
                  ignore_warnings(_multiple_warning_function,
                                  category=UserWarning))
@@ -253,7 +257,7 @@ def f():
 
     def test_warn_wrong_warning(self):
         def f():
-            warnings.warn("yo", DeprecationWarning)
+            warnings.warn("yo", FutureWarning)
 
         failed = False
         filters = sys.modules['warnings'].filters[:]
@@ -668,5 +672,5 @@ def test_create_memmap_backed_data(monkeypatch):
 def test_deprecated_helpers(callable, args):
     msg = ('is deprecated in version 0.22 and will be removed in version '
            '0.24. Please use "assert" instead')
-    with pytest.warns(DeprecationWarning, match=msg):
+    with pytest.warns(FutureWarning, match=msg):
         callable(*args)
diff --git a/sklearn/utils/tests/test_utils.py b/sklearn/utils/tests/test_utils.py
index 8838f4c3cce28..bf9bc72512ce0 100644
--- a/sklearn/utils/tests/test_utils.py
+++ b/sklearn/utils/tests/test_utils.py
@@ -67,7 +67,7 @@ def ham():
         assert spam == "spam"     # function must remain usable
 
         assert len(w) == 1
-        assert issubclass(w[0].category, DeprecationWarning)
+        assert issubclass(w[0].category, FutureWarning)
         assert "deprecated" in str(w[0].message).lower()
 
     # ... then a class.
@@ -83,7 +83,7 @@ class Ham:
         assert hasattr(ham, "SPAM")
 
         assert len(w) == 1
-        assert issubclass(w[0].category, DeprecationWarning)
+        assert issubclass(w[0].category, FutureWarning)
         assert "deprecated" in str(w[0].message).lower()
 
 
@@ -639,7 +639,8 @@ def dummy_func():
 def test_deprecation_joblib_api(tmpdir):
     def check_warning(*args, **kw):
         return assert_warns_message(
-            DeprecationWarning, "deprecated in version 0.20.1", *args, **kw)
+            FutureWarning, "deprecated in version 0.20.1",
+            *args, **kw)
 
     # Ensure that the joblib API is deprecated in sklearn.util
     from sklearn.utils import Parallel, Memory, delayed
diff --git a/sklearn/utils/tests/test_validation.py b/sklearn/utils/tests/test_validation.py
index f362d3dca1270..10af78e65c04a 100644
--- a/sklearn/utils/tests/test_validation.py
+++ b/sklearn/utils/tests/test_validation.py
@@ -450,7 +450,7 @@ def test_check_array_dtype_warning():
 
     for X in float64_data:
         with pytest.warns(None) as record:
-            warnings.simplefilter("ignore", DeprecationWarning)  # 0.23
+            warnings.simplefilter("ignore", FutureWarning)  # 0.23
             X_checked = check_array(X, dtype=np.float64,
                                     accept_sparse=True, warn_on_dtype=True)
             assert X_checked.dtype == np.float64
@@ -485,10 +485,10 @@ def test_check_array_dtype_warning():
 def test_check_array_warn_on_dtype_deprecation():
     X = np.asarray([[0.0], [1.0]])
     Y = np.asarray([[2.0], [3.0]])
-    with pytest.warns(DeprecationWarning,
+    with pytest.warns(FutureWarning,
                       match="'warn_on_dtype' is deprecated"):
         check_array(X, warn_on_dtype=True)
-    with pytest.warns(DeprecationWarning,
+    with pytest.warns(FutureWarning,
                       match="'warn_on_dtype' is deprecated"):
         check_X_y(X, Y, warn_on_dtype=True)
 
@@ -725,11 +725,11 @@ def test_check_is_fitted():
 
     # to be removed in 0.23
     assert_warns_message(
-        DeprecationWarning,
+        FutureWarning,
         "Passing attributes to check_is_fitted is deprecated",
         check_is_fitted, ard, ['coef_'])
     assert_warns_message(
-        DeprecationWarning,
+        FutureWarning,
         "Passing all_or_any to check_is_fitted is deprecated",
         check_is_fitted, ard, all_or_any=any)
 
@@ -799,7 +799,7 @@ def test_check_dataframe_warns_on_dtype():
     assert_warns(DataConversionWarning, check_array, df,
                  dtype='numeric', warn_on_dtype=True)
     with pytest.warns(None) as record:
-        warnings.simplefilter("ignore", DeprecationWarning)  # 0.23
+        warnings.simplefilter("ignore", FutureWarning)  # 0.23
         check_array(df, dtype='object', warn_on_dtype=True)
     assert len(record) == 0
 
@@ -818,7 +818,7 @@ def test_check_dataframe_warns_on_dtype():
     assert_warns(DataConversionWarning, check_array, df_mixed_numeric,
                  dtype='numeric', warn_on_dtype=True)
     with pytest.warns(None) as record:
-        warnings.simplefilter("ignore", DeprecationWarning)  # 0.23
+        warnings.simplefilter("ignore", FutureWarning)  # 0.23
         check_array(df_mixed_numeric.astype(int),
                     dtype='numeric', warn_on_dtype=True)
     assert len(record) == 0
@@ -1007,11 +1007,11 @@ def test_deprecate_positional_args_warns_for_function():
     def f1(a, b, *, c=1, d=1):
         pass
 
-    with pytest.warns(DeprecationWarning,
+    with pytest.warns(FutureWarning,
                       match=r"Pass c=3 as keyword args"):
         f1(1, 2, 3)
 
-    with pytest.warns(DeprecationWarning,
+    with pytest.warns(FutureWarning,
                       match=r"Pass c=3, d=4 as keyword args"):
         f1(1, 2, 3, 4)
 
@@ -1019,7 +1019,7 @@ def f1(a, b, *, c=1, d=1):
     def f2(a=1, *, b=1, c=1, d=1):
         pass
 
-    with pytest.warns(DeprecationWarning,
+    with pytest.warns(FutureWarning,
                       match=r"Pass b=2 as keyword args"):
         f2(1, 2)
 
@@ -1031,11 +1031,11 @@ class A1:
         def __init__(self, a, b, *, c=1, d=1):
             pass
 
-    with pytest.warns(DeprecationWarning,
+    with pytest.warns(FutureWarning,
                       match=r"Pass c=3 as keyword args"):
         A1(1, 2, 3)
 
-    with pytest.warns(DeprecationWarning,
+    with pytest.warns(FutureWarning,
                       match=r"Pass c=3, d=4 as keyword args"):
         A1(1, 2, 3, 4)
 
@@ -1044,10 +1044,10 @@ class A2:
         def __init__(self, a=1, b=1, *, c=1, d=1):
             pass
 
-    with pytest.warns(DeprecationWarning,
+    with pytest.warns(FutureWarning,
                       match=r"Pass c=3 as keyword args"):
         A2(1, 2, 3)
 
-    with pytest.warns(DeprecationWarning,
+    with pytest.warns(FutureWarning,
                       match=r"Pass c=3, d=4 as keyword args"):
         A2(1, 2, 3, 4)
diff --git a/sklearn/utils/validation.py b/sklearn/utils/validation.py
index 77f0e0b0d1612..956415f42473e 100644
--- a/sklearn/utils/validation.py
+++ b/sklearn/utils/validation.py
@@ -435,7 +435,7 @@ def check_array(array, accept_sparse=False, accept_large_sparse=True,
             "'warn_on_dtype' is deprecated in version 0.21 and will be "
             "removed in 0.23. Don't set `warn_on_dtype` to remove this "
             "warning.",
-            DeprecationWarning, stacklevel=2)
+            FutureWarning, stacklevel=2)
 
     # store reference to original array to check if copy is needed when
     # function returns
@@ -927,11 +927,11 @@ def check_is_fitted(estimator, attributes='deprecated', msg=None,
     if attributes != 'deprecated':
         warnings.warn("Passing attributes to check_is_fitted is deprecated"
                       " and will be removed in 0.23. The attributes "
-                      "argument is ignored.", DeprecationWarning)
+                      "argument is ignored.", FutureWarning)
     if all_or_any != 'deprecated':
         warnings.warn("Passing all_or_any to check_is_fitted is deprecated"
                       " and will be removed in 0.23. The any_or_all "
-                      "argument is ignored.", DeprecationWarning)
+                      "argument is ignored.", FutureWarning)
     if isclass(estimator):
         raise TypeError("{} is a class, not an instance.".format(estimator))
     if msg is None:
@@ -1141,7 +1141,7 @@ def inner_f(*args, **kwargs):
             warnings.warn("Pass {} as keyword args. From version 0.24 "
                           "passing these as positional arguments will "
                           "result in an error".format(", ".join(args_msg)),
-                          DeprecationWarning)
+                          FutureWarning)
         kwargs.update({k: arg for k, arg in zip(all_args, args)})
         return f(**kwargs)
     return inner_f


Code review comments:
diff_hunk: @@ -102,10 +102,10 @@ Other `pytest` options that may become useful include:
     statements
   - ``--tb=short`` or ``--tb=line`` to control the length of the logs
 
-Since our continuous integration tests will error if ``DeprecationWarning``
-or ``FutureWarning`` aren't properly caught, it is also recommended to run
-``pytest`` along with the ``-Werror::DeprecationWarning`` and
-``-Werror::FutureWarning`` flags.
+Since our continuous integration tests will error if
+``FutureWarning`` or ``FutureWarning`` aren't properly caught,
path: doc/developers/tips.rst
text: @user1:
```suggestion
``FutureWarning`` isn't properly caught,
```

diff_hunk: @@ -461,7 +462,8 @@ def test_check_estimator_clones():
             check_estimator(est)
         assert old_hash == joblib.hash(est)
 
-        with ignore_warnings(category=(FutureWarning, DeprecationWarning)):
+        with ignore_warnings(category=(FutureWarning,
+                                       FutureWarning)):
path: sklearn/utils/tests/test_estimator_checks.py
text: @user1:
repeated `FutureWarning`

diff_hunk: @@ -10,7 +10,7 @@ mkdir %TMP_FOLDER%
 cd %TMP_FOLDER%
 
 if "%CHECK_WARNINGS%" == "true" (
-    set PYTEST_ARGS=%PYTEST_ARGS% -Werror::DeprecationWarning -Werror::FutureWarning
+    set PYTEST_ARGS=%PYTEST_ARGS% -Werror::FutureWarning
path: build_tools/azure/test_script.cmd
text: @user1:
I would still error on `DeprecationWarning` here.

@author:
Why, we don't issue these anymore?

@user1:
I know, but we'd need to fail on a `DeprecationWarning`accidentally raised by us, or by our dependencies (not sure if we do that now though)

@author:
Ok fair, I'll add them back.

diff_hunk: @@ -451,7 +451,8 @@ def test_check_estimator_clones():
     for Estimator in [GaussianMixture, LinearRegression,
                       RandomForestClassifier, NMF, SGDClassifier,
                       MiniBatchKMeans]:
-        with ignore_warnings(category=(FutureWarning, DeprecationWarning)):
+        with ignore_warnings(category=(FutureWarning,
+                                       FutureWarning)):
path: sklearn/utils/tests/test_estimator_checks.py
text: @user1:
repeated `FutureWarning`

diff_hunk: @@ -45,7 +45,8 @@
 
 # numpydoc 0.8.0's docscrape tool raises because of collections.abc under
 # Python 3.7
-@pytest.mark.filterwarnings('ignore::DeprecationWarning')
+@pytest.mark.filterwarnings(
path: sklearn/tests/test_docstring_parameters.py
text: @user1:
if this is about numpydoc, why would we change it?

@author:
We don't error anymore on `DeprecationWarning`, so I should remove the comment about numpydoc (still open to discussion of course, so I won't right now)

but we still need to ignore FutureWarning because some entire modules are deprecated.



@user1:
I know, but we'd need to fail on a `DeprecationWarning`accidentally raised by us, or by our dependencies (not sure if we do that now though)

__EDIT__: sorry, this applies to the one above.