(cls, retries, redirect=True, default=None)
return new_retries
Backwards-compatibility for the old retries format.
Backwards-compatibility for the old retries format.
Backwards - compatibility for the old retries format .
def from_int(cls, retries, redirect=True, default=None):
        """ Backwards-compatibility for the old retries format."""
        if retries is None:
            retries = default if default is not None else cls.DEFAULT

        if isinstance(retries, Retry):
            return retries

        redirect = bool(redirect) and None
        new_retries = cls(retries, redirect=redirect)
        log.debug("Converted retries value: %r -> %r", retries, new_retries)
        return new_retries
def from_int ( cls , retries , redirect = True , default = None ) : if retries is None : retries = default if default is not None else cls . DEFAULT if isinstance ( retries , Retry ) : return retries redirect = bool ( redirect ) and None new_retries = cls ( retries , redirect = redirect ) log . debug ( "Converted retries value: %r -> %r" , retries , new_retries ) return new_retries