Skip to content
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

retries - urllib3 fallback import from vendored version in requests is not correct #116

Closed
briantist opened this issue Aug 1, 2021 · 0 comments · Fixed by #113
Closed
Assignees
Labels
bug Something isn't working

Comments

@briantist
Copy link
Collaborator

SUMMARY

In implementing retries, we need urllib3.util.Retry. We first try to import a standalone version of urllib3, which is usually available.

We have a fallback in case that fails to try to import via the requests library, which has a vendored version of urllib3 as well:

from requests.packages.urllib3.util import Retry

However this is not the correct form; instead we must import urllib3 as a module:

from requests.packages import urllib3

And then use it from there.

See: https://docs.python-requests.org/en/master/community/updates/#id25

No bug reports or issues in the wild have yet come up as a result of this, to my knowledge.

ISSUE TYPE
  • Bug Report
COMPONENT NAME
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
@briantist briantist added the bug Something isn't working label Aug 1, 2021
@briantist briantist self-assigned this Aug 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant