Good catch. Fixed in 0d068ee

On 1/29/14, 1:00, Cory Benfield wrote:
>
> In urllib3/util/retry.py:
>
> > +
> > +    :param float backoff_factor:
> > +        A backoff factor to apply between attempts. urllib3 will sleep for
> > +        `(backoff factor * (2 ^ (number of total retries - 1))` seconds. So
> > +        if the backoff factor is 1, urllib3 will sleep 1, 2, 4, 8... seconds
> > +        between retries. If the backoff factor is 0.5, urllib3 will sleep 0.5,
> > +        1, 2, 4... seconds between retries.
> > +
> > +        By default, the backoff factor is 0, which means that urllib3 will not
> > +        sleep between retry attempts.
> > +    """
> > +
> > +    DEFAULT_METHOD_WHITELIST = set(['HEAD', 'GET', 'PUT',
> > +                                    'DELETE', 'OPTIONS', 'TRACE'])
> > +    SERVER_ERROR_RESPONSE = xrange(500, 599)
> > +    NON_200_RESPONSE = xrange(300, 599)
>
> Uh, the idea of doing a linear search over 300 values to determine 
> that, for instance, 200 is not an error code gives me a rash. Can this 
> really be the best way of approaching that behaviour?
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/shazow/urllib3/pull/326/files#r9259535>.
>