def v1_deprecated(warning=None):
  warning = warning or ''
  # This closure is what is returned from the deprecated function.
  def mark_deprecated(f):
    # The deprecated_function wraps the actual call to f.
    def optional_warn_function(*args, **kwargs):
      if ENABLE_V1_WARNINGS:
        warnings.warn(warning, DeprecationWarning, stacklevel=2)
      return f(*args, **kwargs)
    # Preserve the original name to avoid masking all decorated functions as
    # 'deprecated_function'
    try:
      optional_warn_function.func_name = f.func_name
    except TypeError:
      pass # In Python2.3 we can't set the func_name
    return optional_warn_function
  return mark_deprecated
Remove the named file or directory
dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/PicasaSnap/atom/__init__.py/v1_deprecated--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/win_file.py/remove