Replies: 5 comments 2 replies
-
I can see some users wanting to retry forever, and using |
Beta Was this translation helpful? Give feedback.
-
#102 This PR implements this idea |
Beta Was this translation helpful? Give feedback.
-
We use |
Beta Was this translation helpful? Give feedback.
-
Hey, sorry everyone for the late response. I've been traveling and to be honest also waffling on the topic. Clearly, the rationale for #102 is correct. I would never make this breaking though – the current approach might be a bit primitive, but I think it could be called vaguely Pythonic. stamina is at this point production-grade, so breaking our users like this is at this point not an option anymore. But I've also got bellyaches when it comes to steering people to use a specific way using warnings to achieve the same thing. It's a bit too much past the "paternalistic" line. I have decided to leave the code as it is, however I have improved the documentation in 133325c. Feel free to lmk how y'all feel about it. |
Beta Was this translation helpful? Give feedback.
-
@hynek Makes sense, I've repurposed #102 to reflect only the "fix" part of that MR if you'd consider reopening that |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is technically breaking change but doubt it's being used intentionally.
Would like to propose that a ValueError is raised if
attempts is None and timeout is None
to prevent unboundedstop_never
.This edge-case if required can still be implemented by passing "math.inf" to either parameter.
Think it aligns with goals of "stamina", to reduce bad patterns such as unbounded stop conditions.
I can submit a change but thought I'd raise discussion here first.
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions