{"action":"closed","issue":{"url":"https://api.github.com/repos/shazow/urllib3/issues/847","repository_url":"https://api.github.com/repos/shazow/urllib3","labels_url":"https://api.github.com/repos/shazow/urllib3/issues/847/labels{/name}","comments_url":"https://api.github.com/repos/shazow/urllib3/issues/847/comments","events_url":"https://api.github.com/repos/shazow/urllib3/issues/847/events","html_url":"https://github.com/shazow/urllib3/issues/847","id":148892899,"number":847,"title":"Retry backoff behavior inconsistent with documentation","user":{"login":"appeltel","id":4991673,"avatar_url":"https://avatars.githubusercontent.com/u/4991673?v=3","gravatar_id":"","url":"https://api.github.com/users/appeltel","html_url":"https://github.com/appeltel","followers_url":"https://api.github.com/users/appeltel/followers","following_url":"https://api.github.com/users/appeltel/following{/other_user}","gists_url":"https://api.github.com/users/appeltel/gists{/gist_id}","starred_url":"https://api.github.com/users/appeltel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appeltel/subscriptions","organizations_url":"https://api.github.com/users/appeltel/orgs","repos_url":"https://api.github.com/users/appeltel/repos","events_url":"https://api.github.com/users/appeltel/events{/privacy}","received_events_url":"https://api.github.com/users/appeltel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-04-16T21:14:42Z","updated_at":"2016-07-22T14:01:06Z","closed_at":"2016-07-22T14:01:06Z","body":"The docstring for urllib3.util.retry.Retry indicates that \"If the backoff_factor is 0.1, then :func:`.sleep` will sleep for [0.1s, 0.2s, 0.4s, ...] between retries.\"\r\n\r\nThat isn't consistent with the actual behavior on the first retry, as when `_observed_errors == 1` the sleep function returns 0, so there is no wait after the first retry. This behavior is specifically covered by a unit test requiring the first sleep to return 0. According to the actual behavior, the documentation should read \"[0.0s, 0.2s, 0.4s, ...] between retries.\", and probably also note that there is no wait after the first retry.\r\n\r\nI'm not sure what the intended behavior is, or what it should be in principle. My vote would be for a wait after the first retry, and I would be happy to contribute a quick fix in either case.\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/33027120-retry-backoff-behavior-inconsistent-with-documentation?utm_campaign=plugin&utm_content=tracker%2F192525&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F192525&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"}}
{"actor":{"display_login":"Lukasa"}}