need to re-attempt backoff and yaml imports if the first import attempt fails #820
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
proxy_server has a try-import-except-pip-import block, but there were a couple of imports missing in the second block.
On running in a clean docker container for the first time from source, one of the imports fails, so it runs pip install. This succeeds, but the yaml module never got imported.
Also, one thing to be aware of is that some modules don't survive this approach - a package I maintain used the same trick, and it worked most of the time, but on some users machines / configs python would remember that a module had been unavailable and it wouldn't load it on the second import :(
#819