From 7938a635e7fa4859d7cf64942ba89bc8c424aa43 Mon Sep 17 00:00:00 2001 From: Arun Kannawadi Date: Wed, 25 Sep 2024 17:15:10 -0400 Subject: [PATCH] Add an explicit example deprecating a class --- stack/deprecating-interfaces.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/stack/deprecating-interfaces.rst b/stack/deprecating-interfaces.rst index 7fc4abed..7029b166 100644 --- a/stack/deprecating-interfaces.rst +++ b/stack/deprecating-interfaces.rst @@ -59,7 +59,14 @@ If you need to deprecate a class or function, import the `~deprecated.sphinx.dep from deprecated.sphinx import deprecated -For each class or function to be deprecated, decorate it as follows:: +For each class to be deprecated, decorate it as follows:: + + @deprecated(reason="The MakeWarpTask is replaced by MakeDirectWarpTask and MakePsfMatchedWarpTask. " + "This Task will be removed after v28.", + version="v28.0", category=FutureWarning) + class MakeWarpTask(CoaddBaseTask): + +and for each function to be deprecated, decorate it similarly as follows:: @deprecated(reason="This method is no longer used for ISR. Will be removed after v14.", version="v14.0", category=FutureWarning)