-
-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8.4.2 breaks suggested way to overwrite tenacity behaviors on unit tests #482
Comments
I'm also seeing this too because the removal of this has thrown off everything
There is no way to access the retry object now. |
cc @hasier |
Also seeing this after upgrade to 8.4.2. Things like this used to work, but no longer - the test suite which used to take 2 mins to run now takes 12:
|
I also got hit by that regression, it seems simply mocking |
Am also hit by this regression. Using an earlier version for tenacity for now. |
@jd this use case seems like one more iteration on the fix for the initial scenario #478. I changed the value for The root cause to me feels like the need to read properties for a decorated function while accounting for the fact that it can be called recursively, in which case the wrapping retry object, statistics, etc. lose a bit of meaning. If we were to tackle this more generally, maybe we'd need to separately track the calls and retry objects in a sort-of-list format, so that each call and their properties can be checked separately? In this case we could keep a writeable If you prefer a more short-term solution, I feel like there are a couple of different things we could do, depending on your preference:
|
I feel like restoring the assignment to self and make it clear that the object access is only meant to read/modify the retry object is the way to go. |
Looks like the change introduced with 8.4.2: 8.4.1...8.4.2
Breaks the suggested behavior to overwrite tenacity wait time/retry confiig on tests, as suggested here:
#106
Doesn't looks like this was done by propose, is it expected? If yes, what would be the suggested way to ovewrite the retry config in tests to speed it up?
The text was updated successfully, but these errors were encountered: