parameters: (cls, retries, redirect=True, default=None)
return_statement: return new_retries
docstring: Backwards-compatibility for the old retries format.
docstring_summary: Backwards-compatibility for the old retries format.
docstring_tokens: Backwards - compatibility for the old retries format .
function: 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
function_tokens: 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