-
Notifications
You must be signed in to change notification settings - Fork 3.1k
[WIP] Move from retrying
to tenacity
#7592
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
Conversation
- Use seconds instead of milliseconds - Reraise the original exception instead of RetryError
Question: I noticed Any pointers on how to deal with these? |
Huh, looks like I never made my comment about the vendoring process. :/
pip uses vendoring to vendor dependencies. The main way to use it is to run If we need to make changes, the patches are held in the There's a Travis CI job to ensure that the vendoring is done correctly, which essentially re-runs the vendoring process, to make sure that the result of re-vendoring dependencies is the same as what's been committed. :) |
Right, so I basically was doing things manually 😅 Thanks! I do face a problem with I tried adding it manually but Seems like a lot of work for |
Hmm... It's a code smell and I don't like it. :/ We could add a "pass --ignore-requires-python to pip" configuration to vendoring but that feels a bit hacky to me. I'm not opposed to doing that -- I just want to avoid it if we can. Are there alternatives that, like, aren't tricky to vendor? |
Yea, this was an intentional design choice, to prevent users from adding dependencies and not specifying them as such (this is all working as planned basically). |
Agreed.
Not that I know of. Given the use of the I'm fine with closing this PR if you feel it's not worth it. Or maybe you have an alternative? |
I'm going to close this now since, as I mentioned, I don't feel it's worth the hackery required to vendor |
Thanks for working on this @yeraydiazdiaz! One thought - would it be possible to vendor |
That's a good idea. Assuming I'll give it a go, thanks for the suggestion 👍 |
So I've spent some time on this and I feel that it might be more trouble than it's worth. There's enough differences between the two APIs to make the wrapper quite complex and bug-prone. It would also give the false impression to the user that they can use whatever feature of All in all, IMHO keeping the vendored |
Sounds reasonable. Thanks for investigating the suggestion anyway :-) |
Closes #7530
I've replaced
retrying
withtenacity
on_vendor
. Bot some modifications had to be made to the source to adapt it topip
, specifically absolute imports oftenacity
andsix
. This is the bulk of the contents of this PR, you can safely ignore all files in_vendor/tenacity
.However, these changes cause the
vendoring
tox environment to fail, I'm not really sure what the solution would be.Adapted API calls to
retry
totenacity
:stop_max_delay
andwait_fixed
are no longer kwargs toretry
but are imported and passed as values to thestop
andwait
kwargs.