def pending_deprecation(version, message=None, add_deprecation_to_docstring=True):
 if add_deprecation_to_docstring:
  header = ('.. deprecated:: %s (pending) %s' % (version, (message or '')))
 else:
  header = None
 if (message is None):
  message = 'Call to deprecated function %(func)s'
 def decorate(fn):
  return _decorate_with_warning(fn, exc.SAPendingDeprecationWarning, (message % dict(func=fn.__name__)), header)
 return decorate

def pending_deprecation ( version , message = None , add_deprecation_to_docstring = True ) : if add_deprecation_to_docstring : header = ( '.. deprecated:: %s (pending) %s' % ( version , ( message or '' ) ) ) else : header = None if ( message is None ) : message = 'Call to deprecated function %(func)s' def decorate ( fn ) : return _decorate_with_warning ( fn , exc . SAPendingDeprecationWarning , ( message % dict ( func = fn . __name__ ) ) , header ) return decorate
decorates a function and issues a pending deprecation warning on use .