Daniel Fortunov
Daniel Fortunov
You might find my response to #336 helpful...
Looks like you want to use the `for` loop invocation of tenacity. Have a look at this example: https://tenacity.readthedocs.io/en/latest/#retrying-code-block
I think a custom variant of `before_sleep_log` is exactly what you need. You can use a closure to maintain a set of "seen errors" between calls to the inner `log_it`...
Personally I think defining `__all__` makes it clearer that the intent is to define a public API. I'm not familiar with the import conventions you mentioned or their origins, but...
As a relatively new user of Tenaticy I can say that the flexibility of configuration, whilst powerful, brings about the possibility of misconfiguring and getting unexpected behaviour. This change seems...
Does line 371 in the listing below just need to move up to 361, so that we set this metric after successful attempts too? https://github.com/jd/tenacity/blob/e31e0119aa37919d90a388177add3ba027ec0f3f/tenacity/__init__.py#L355-L392
Just out of interest: Which part of this change breaks 2.6 compatibility?
Just came across the same curiosity... This dependency was added in https://github.com/invl/retry/commit/e7819e5b795de10bf60cd877890ad38807df2598 at the same time as the dependency on pytest (which was later moved to `test-requirements.txt`) but I'm not...
Looking at [Before and After Retry, and Logging](https://github.com/jd/tenacity#before-and-after-retry-and-logging) it is possible to execute an action: 1. Before _any_ attempt of calling the function (`before` action) 2. After a call that...
`src/scratch.py` looks something like this: ``` from foo import bar # Import from our internal codebase class A: pass A().foo() ``` (Unfortunately I can't share the codebase that this is...