{"action":"opened","issue":{"url":"https://api.github.com/repos/h2non/riprova/issues/11","repository_url":"https://api.github.com/repos/h2non/riprova","labels_url":"https://api.github.com/repos/h2non/riprova/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/h2non/riprova/issues/11/comments","events_url":"https://api.github.com/repos/h2non/riprova/issues/11/events","html_url":"https://github.com/h2non/riprova/issues/11","id":199690023,"number":11,"title":"Can't pass sleep_fn from retry to Retrier","user":{"login":"pohmelie","id":2385765,"avatar_url":"https://avatars.githubusercontent.com/u/2385765?v=3","gravatar_id":"","url":"https://api.github.com/users/pohmelie","html_url":"https://github.com/pohmelie","followers_url":"https://api.github.com/users/pohmelie/followers","following_url":"https://api.github.com/users/pohmelie/following{/other_user}","gists_url":"https://api.github.com/users/pohmelie/gists{/gist_id}","starred_url":"https://api.github.com/users/pohmelie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pohmelie/subscriptions","organizations_url":"https://api.github.com/users/pohmelie/orgs","repos_url":"https://api.github.com/users/pohmelie/repos","events_url":"https://api.github.com/users/pohmelie/events{/privacy}","received_events_url":"https://api.github.com/users/pohmelie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-09T23:17:42Z","updated_at":"2017-01-09T23:17:42Z","closed_at":null,"body":"``` python\r\n>>> import riprova\r\n>>> import time\r\n>>> def my_sleep(*args, **kwargs): print(\"my sleep\", args, kwargs); time.sleep(*args, **kwargs)\r\n... \r\n>>> my_sleep(1)\r\nmy sleep (1,) {}\r\n>>> def fail(): raise Exception\r\n... \r\n>>> riprova.retry(backoff=riprova.ConstantBackoff(interval=2, retries=5), sleep_fn=my_sleep)(fail)()\r\nTraceback (most recent call last):\r\n  File \"<input>\", line 1, in <module>\r\n    riprova.retry(backoff=riprova.ConstantBackoff(interval=2, retries=5), sleep_fn=my_sleep)(fail)()\r\n  File \"/home/poh/pro/py/riprova/riprova/retry.py\", line 132, in wrapper\r\n    return retry_runner(*args, **kw)\r\n  File \"/home/poh/pro/py/riprova/riprova/retrier.py\", line 294, in run\r\n    delay = self._get_delay()\r\n  File \"/home/poh/pro/py/riprova/riprova/retrier.py\", line 246, in _get_delay\r\n    self.error)\r\n  File \"<string>\", line 2, in raise_from\r\nriprova.exceptions.MaxRetriesExceeded: max retries exceeded\r\n>>> \r\n```\r\n\r\nThe reason is identical names for keyword only arguments for decorator and wrapper:\r\nhttps://github.com/h2non/riprova/blob/master/riprova/retry.py#L24\r\nhttps://github.com/h2non/riprova/blob/master/riprova/retry.py#L120"}}
{"actor":{"display_login":"pohmelie"}}