> For this SpectralClustering one though, this does not involve the fit at all.
> It is in base.py:get_params.

>         for key in self._get_param_names():
>             # catch deprecation warnings
>             with warnings.catch_warnings(record=True) as w:
>                 value = getattr(self, key, None)
>             if len(w) and w[0].category == DeprecationWarning:
>                 # if the parameter is deprecated, don't show it
>                 continue

> In get_params we inspect the constructor args to find out all the arg names
> (via _get_param_names). We then call getattr to get the value. The k parameter
> has value None in the constructor, but getattr will trigger the property

>     @property
>     @deprecated("'k' was renamed to n_clusters and will be removed in"
>                 " 0.15.")
>     def k(self):
>         return self.n_clusters

> So this test has nothing to do with Python3. We can submit some sort of fix,
> but that probably belongs in another pull request.

Looking up k should raise a deprecation warning, and thus be skipped by
the code above. Isn't it the case?