Repository: nilearn/nilearn

Issue:
Deprecation cycle for fetch_haxby_simple ?
**What version of Nilearn are you using?** 0.6.0b

The current code suggests that `fetch_haxby_simple` will [be removed in a future release](https://github.com/nilearn/nilearn/blob/39c798e0310999e02341452ada6387958c04f72d/nilearn/datasets/func.py#L23), but it's unclear when that deprecation cycle is expected to occur. 

It looks like this warning was added in 2016 in #1127. Since we seem to be shipping the haxby simple data in our [datasets](https://github.com/nilearn/nilearn/blob/master/nilearn/datasets/data/pymvpa-exampledata.tar.bz2), I'm unsure if this can be used in eg the `index_img` docstring (see #2189) or if it will be removed in the near future.

Any insight is appreciated !




Discussion:
Should probably be for the next release then...
thx.
This is way overdue for removal, but removing it as a last minute rush job seems unwise.
I was gonna say to focus on #2189 and use it if you think you should & we can always modify this later.
The alternative as I see it would be to defer PR #2189 for Nilearn 07.x .
What do you think?
> This is way overdue for removal, but removing it as a last minute rush job seems unwise

WDYT of at least updating the deprecation warning to give a timeline for the anticipated removal (maybe 0.7.0) ?
Yes we should definitely do that

On Tue, Dec 3, 2019, 15:18 Elizabeth DuPre <notifications@github.com> wrote:

> This is way overdue for removal, but removing it as a last minute rush job
> seems unwise
>
> WDYT of at least updating the deprecation warning to give a timeline for
> the anticipated removal (maybe 0.7.0) ?
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/nilearn/nilearn/issues/2230?email_source=notifications&email_token=AB6SXRFOKN7G4F25HA2SI2DQWZTDTA5CNFSM4JRAN7Y2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFZQVDQ#issuecomment-561187470>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AB6SXRGLWBJ6UZB6OF64PLTQWZTDTANCNFSM4JRAN7YQ>
> .
>

Targeting 0.7.0 seems sound.
:+1: I can open a PR with that timeline, then !
@emdupre Would you do this today? Else I can.
Can do today, sorry ! It will take me until lunch EST if that's ok.
Yup! 
PS: It's a simple enough one, I can do it if you would rather use your brainhack time attending to more complex ones.

Resolving patch:
diff --git a/nilearn/datasets/func.py b/nilearn/datasets/func.py
--- a/nilearn/datasets/func.py
+++ b/nilearn/datasets/func.py
@@ -9,7 +9,7 @@
 import numbers
 
 import nibabel
-from sklearn.utils import Bunch, deprecated
+from sklearn.utils import Bunch
 
 from .utils import (_get_dataset_dir, _fetch_files, _get_dataset_descr,
                     _read_md5_sum_file, _tree, _filter_columns, _fetch_file)
@@ -20,11 +20,12 @@
 from nilearn.image import get_data
 
 
-@deprecated("fetch_haxby_simple will be removed in future releases. "
-            "Use 'fetch_haxby' instead.")
 def fetch_haxby_simple(data_dir=None, url=None, resume=True, verbose=1):
     """Download and load a simple example haxby dataset.
 
+    NOTE: This function is deprecated and will be removed in
+    0.7.0 release. Use `fetch_haxby` instead.
+
     Parameters
     ----------
     data_dir: string, optional
@@ -59,6 +60,11 @@ def fetch_haxby_simple(data_dir=None, url=None, resume=True, verbose=1):
     See `additional information
     <http://www.sciencemag.org/content/293/5539/2425>`_
     """
+    warnings.warn("fetch_haxby_simple has been deprecated and will "
+                  "be removed in the 0.7.x release. "
+                  "Use 'fetch_haxby' instead",
+                  VisibleDeprecationWarning, stacklevel=2)
+
     # URL of the dataset. It is optional because a test uses it to test dataset
     # downloading
     if url is None:


Test patch: