def webapi_deprecated(deprecated_in, force_error_http_status=None, default_api_format=None, encoders=[]):
 def _dec(view_func):
  def _view(*args, **kwargs):
   if default_api_format:
    request = args[0]
    assert isinstance(request, HttpRequest)
    method_args = getattr(request, request.method, None)
    if (method_args and (u'api_format' not in method_args)):
     method_args = method_args.copy()
     method_args[u'api_format'] = default_api_format
     setattr(request, request.method, method_args)
   response = view_func(*args, **kwargs)
   if isinstance(response, WebAPIResponse):
    response.encoders = encoders
   if isinstance(response, WebAPIResponseError):
    response.api_data[u'deprecated'] = {u'in_version': deprecated_in}
    if (force_error_http_status and isinstance(response, WebAPIResponseError)):
     response.status_code = force_error_http_status
   return response
  return _view
 return _dec

def webapi_deprecated ( deprecated_in , force_error_http_status = None , default_api_format = None , encoders = [ ] ) : def _dec ( view_func ) : def _view ( * args , ** kwargs ) : if default_api_format : request = args [ 0 ] assert isinstance ( request , HttpRequest ) method_args = getattr ( request , request . method , None ) if ( method_args and ( u'api_format' not in method_args ) ) : method_args = method_args . copy ( ) method_args [ u'api_format' ] = default_api_format setattr ( request , request . method , method_args ) response = view_func ( * args , ** kwargs ) if isinstance ( response , WebAPIResponse ) : response . encoders = encoders if isinstance ( response , WebAPIResponseError ) : response . api_data [ u'deprecated' ] = { u'in_version' : deprecated_in } if ( force_error_http_status and isinstance ( response , WebAPIResponseError ) ) : response . status_code = force_error_http_status return response return _view return _dec
marks an api handler as deprecated .