From 0bcd1eb863854a64540ce21fe081af9e16167266 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Thu, 12 Feb 2015 17:26:41 -0800 Subject: [PATCH] Mark conductor 'stop' method deprecation kwarg with versions To make it known (when the warning message is emitted) what version this was deprecated in and when it may be removed in add those parameters to the 'removed_kwarg' decorator so that users of conductors are aware of this information. Change-Id: Iacc97831ccd96d68cea4bd7e65a967b5ff9e7dc5 --- taskflow/conductors/single_threaded.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/taskflow/conductors/single_threaded.py b/taskflow/conductors/single_threaded.py index 126917fe..23045146 100644 --- a/taskflow/conductors/single_threaded.py +++ b/taskflow/conductors/single_threaded.py @@ -65,7 +65,8 @@ class SingleThreadedConductor(base.Conductor): raise ValueError("Invalid timeout literal: %s" % (wait_timeout)) self._dead = threading_utils.Event() - @deprecation.removed_kwarg('timeout') + @deprecation.removed_kwarg('timeout', + version="0.8", removal_version="?") def stop(self, timeout=None): """Requests the conductor to stop dispatching. @@ -75,10 +76,10 @@ class SingleThreadedConductor(base.Conductor): The method returns immediately regardless of whether the conductor has been stopped. - :param timeout: This parameter is deprecated and is present for - backward compatibility. In order to wait for the - conductor to gracefully shut down, :meth:`wait` should - be used. + :param timeout: This parameter is **deprecated** and is present for + backward compatibility **only**. In order to wait for + the conductor to gracefully shut down, :meth:`wait` + should be used instead. """ self._wait_timeout.interrupt()