Internal convenience function for deprecation warnings
162147
def _depr(fn, usage, stacklevel=3):
    """"""
    warn('{0} is deprecated. Use {1} instead'.format(fn, usage),
         stacklevel=stacklevel, category=DeprecationWarning)
110307
def deprecations(self, index=None, params=None):
        
        return self.transport.perform_request(
            "GET", _make_path(index, "_migration", "deprecations"), params=params
        )
928947
function deprecate(method, name, message) {
    var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\n' + message + ' AT \n';
    return function() {
        var e = new Error('get-stack-trace');
        var stack = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, '')
            .replace(/^\s+at\s+/gm, '')
            .replace(/^Object.<anonymous>\s*\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';

        var log = window.console && (window.console.warn || window.console.log);
        if (log) {
            log.call(window.console, deprecationMessage, stack);
        }
        return method.apply(this, arguments);
    };
}
805193
def _deprecated(func):
    """"""
    @wraps(func)
    def with_warning(*args, **kwargs):
        warnings.warn(
            ('The %s method is deprecated and will be removed in v2.*.*' %
             func.__name__),
            DeprecationWarning
        )
        return func(*args, **kwargs)
    return with_warning
1296073
def deprecate(message):
    """"""
    warnings.simplefilter('default')
    warnings.warn(message, category=DeprecationWarning)
    warnings.resetwarnings()
720979
def _raise_deprecation_note(deprecated, replacement, soft=False):
    
    error_msg = ("`{deprecated}` is deprecated. Please use `{replacement}`. "
                 "`{deprecated}` will be removed in future versions of "
                 "Ray.".format(deprecated=deprecated, replacement=replacement))
    if soft:
        logger.warning(error_msg)
    else:
        raise DeprecationWarning(error_msg)
573864
def deprecated(function):  # pylint: disable=invalid-name
  """"""

  def IssueDeprecationWarning(*args, **kwargs):
    """Issue a deprecation warning."""
    warnings.simplefilter('default', DeprecationWarning)
    warnings.warn('Call to deprecated function: {0:s}.'.format(
        function.__name__), category=DeprecationWarning, stacklevel=2)

    return function(*args, **kwargs)

  IssueDeprecationWarning.__name__ = function.__name__
  IssueDeprecationWarning.__doc__ = function.__doc__
  IssueDeprecationWarning.__dict__.update(function.__dict__)
  return IssueDeprecationWarning
1042557
def deprecated(func):
    
    def deprecation_warning(*args, **kwargs):
        warnings.warn('Call to deprecated function {name}. Please consult our documentation at '
                      'http://pyapi-gitlab.readthedocs.io/en/latest/#gitlab.Gitlab.{name}'.format(name=func.__name__),
                      category=DeprecationWarning)
        return func(*args, **kwargs)
    deprecation_warning.__name__ = func.__name__
    deprecation_warning.__doc__ = func.__doc__
    deprecation_warning.__dict__ = func.__dict__
    return deprecation_warning
7451
def deprecate(cls, fn):
        
        def inner(*args, **kwargs):
            if cls._disable_stubs:
                raise AssertionError('Stubs supporting old API disabled')
            elif cls._disable_stubs is None:
                pass
            elif cls._disable_stubs is False:
                get_logger(name=args[0].__class__.__name__).log(
                    WARNING, 'Use method %r via param namespace ' % fn.__name__)
            return fn(*args, **kwargs)

        inner.__doc__= "Inspect .param.%s method for the full docstring"  % fn.__name__
        return inner
1326541
def _maybe_process_deprecations(r, how=None, fill_method=None, limit=None):
    

    if how is not None:

        # .resample(..., how='sum')
        if isinstance(how, str):
            method = "{0}()".format(how)

            # .resample(..., how=lambda x: ....)
        else:
            method = ".apply(<func>)"

        # if we have both a how and fill_method, then show
        # the following warning
        if fill_method is None:
            warnings.warn("how in .resample() is deprecated\n"
                          "the new syntax is "
                          ".resample(...).{method}".format(
                              method=method),
                          FutureWarning, stacklevel=3)
        r = r.aggregate(how)

    if fill_method is not None:

        # show the prior function call
        method = '.' + method if how is not None else ''

        args = "limit={0}".format(limit) if limit is not None else ""
        warnings.warn("fill_method is deprecated to .resample()\n"
                      "the new syntax is .resample(...){method}"
                      ".{fill_method}({args})".format(
                          method=method,
                          fill_method=fill_method,
                          args=args),
                      FutureWarning, stacklevel=3)

        if how is not None:
            r = getattr(r, fill_method)(limit=limit)
        else:
            r = r.aggregate(fill_method, limit=limit)

    return r
707541
function warnAboutDeprecatedProp(propValue, oldPropName, newPropName) {
  if (propValue !== undefined) {
    console.warn(`[DEPRECATED] the property "${oldPropName}" has been deprecated, use "${newPropName}" instead`);
  }
}
1326366
def deprecated(reason):
    

    if isinstance(reason, string_types):

        # The @deprecated is used with a 'reason'.
        #
        # .. code-block:: python
        #
        #    @deprecated("please, use another function")
        #    def old_function(x, y):
        #      pass

        def decorator(func1):

            if inspect.isclass(func1):
                fmt1 = "Call to deprecated class {name} ({reason})."
            else:
                fmt1 = "Call to deprecated function {name} ({reason})."

            @functools.wraps(func1)
            def new_func1(*args, **kwargs):
                #warnings.simplefilter('default', DeprecationWarning)
                warnings.warn(
                    fmt1.format(name=func1.__name__, reason=reason),
                    category=FieldDeprecationWarning,
                    stacklevel=2
                )
                #warnings.simplefilter('default', DeprecationWarning)
                return func1(*args, **kwargs)

            return new_func1

        return decorator

    elif inspect.isclass(reason) or inspect.isfunction(reason):

        # The @deprecated is used without any 'reason'.
        #
        # .. code-block:: python
        #
        #    @deprecated
        #    def old_function(x, y):
        #      pass

        func2 = reason

        if inspect.isclass(func2):
            fmt2 = "Call to deprecated class {name}."
        else:
            fmt2 = "Call to deprecated function {name}."

        @functools.wraps(func2)
        def new_func2(*args, **kwargs):
            #warnings.simplefilter('default', DeprecationWarning)
            warnings.warn(
                fmt2.format(name=func2.__name__),
                category=FieldDeprecationWarning,
                stacklevel=2
            )
            #warnings.simplefilter('default', DeprecationWarning)
            return func2(*args, **kwargs)

        return new_func2

    else:
        raise TypeError(repr(type(reason)))
1291401
def _param_deprecation_warning(schema, deprecated, context):
    
    for i in deprecated:
        if i in schema:
                msg = 'When matching {ctx}, parameter {word} is deprecated, use __{word}__ instead'
                msg = msg.format(ctx = context, word = i)
                warnings.warn(msg, Warning)
874970
def deprecated (func):
    """"""
    def newfunc (*args, **kwargs):
        """Print deprecated warning and execute original function."""
        warnings.warn("Call to deprecated function %s." % func.__name__,
                      category=DeprecationWarning)
        return func(*args, **kwargs)
    return update_func_meta(newfunc, func)
1016676
function deprecate(fn, msg) {
	  // Allow for deprecating things in the process of starting up.
	  if (isUndefined(global$1.process)) {
	    return function() {
	      return deprecate(fn, msg).apply(this, arguments);
	    };
	  }

	  var warned = false;
	  function deprecated() {
	    if (!warned) {
	      {
	        console.error(msg);
	      }
	      warned = true;
	    }
	    return fn.apply(this, arguments);
	  }

	  return deprecated;
	}
835985
def deprecated(reason):
    

    if isinstance(reason, str):

        # The @deprecated is used with a 'reason'.
        #
        # .. code-block:: python
        #
        #    @deprecated("please, use another function")
        #    def old_function(x, y):
        #      pass

        def decorator(func):

            if inspect.isclass(func):
                msg = "Call to deprecated class {name} ({reason})."
            else:
                msg = "Call to deprecated function {name} ({reason})."

            @functools.wraps(func)
            def wrapper(*args, **kwargs):
                warn_deprecated(msg.format(name=func.__name__, reason=reason))
                warnings.simplefilter('default', DeprecationWarning)
                return func(*args, **kwargs)

            return wrapper

        return decorator

    elif inspect.isclass(reason) or inspect.isfunction(reason):

        # The @deprecated is used without any 'reason'.
        #
        # .. code-block:: python
        #
        #    @deprecated
        #    def old_function(x, y):
        #      pass

        func1 = reason

        if inspect.isclass(func1):
            msg1 = "Call to deprecated class {name}."
        else:
            msg1 = "Call to deprecated function {name}."

        @functools.wraps(func1)
        def wrapper1(*args, **kwargs):
            warn_deprecated(msg1.format(name=func1.__name__))
            return func1(*args, **kwargs)

        return wrapper1

    else:
        raise TypeError(repr(type(reason)))
609095
def warn(self, msg, *args, **kwargs):
    """"""
    if six.PY3:
      warnings.warn("The 'warn' method is deprecated, use 'warning' instead",
                    DeprecationWarning, 2)
    self.log(logging.WARN, msg, *args, **kwargs)