Retrying seems perfect for a library to me. For instance, Haskell has a popular retry library https://hackage.haskell.org/package/retry-0.8.1.0/docs/Contr... and I wouldn't consider it bad to just bring it in.
Is this more symptom of Python deps being "riskier" than Haskell deps due to types or versioning or something?
I just don’t find this tricky. If only every problem I need to solve is as simple as this one.
> Is this more symptom of Python deps being "riskier" than Haskell deps due to types or versioning or something?
No, it’s a distaste for tons of small third-party packages that could easily be done in place. If anything I found Haskell deps more prone to breakage with upgrades compared to Python deps (given my limited experience with Haskell), at least with the set of popular packages I tend to use. Part of that is Python packages tend to not depend on a ton of other packages.
I agree, it's harder to get right that it seems from first glance. The number of implementations I've seen with broken or not-honoured timeouts...
Python also had a retrying library; apparently it's no longer maintained. I've used the tenacity "fork", which has also evolved/introduced some great features like combinable and chainable wait/backoff.
No, I don’t have that notion. Apparently not every package on npm is small or trivial, but the abuse of trivial packages is most well-known and disastrous in the npm ecosystem.
Edit: My god, iOS autowrong is all the rage today.