I believe that it would be better to use the sklearn.utils.deprecated decorator.