Skip to content

Require pyopenssl and add request backoff - #21

Merged
mtmail merged 13 commits into
masterfrom
openssl
May 6, 2020
Merged

Require pyopenssl and add request backoff#21
mtmail merged 13 commits into
masterfrom
openssl

Conversation

@sbscully

Copy link
Copy Markdown
Contributor

I have added a requirement for pyopenssl to the setup.py. The version is set to >=0.15.1 because that is the latest version that works with python 2.6 and 3.2 mentioned in the setup.py classifiers. pyopenssl 0.15.1 is quite old (April 2015) but I don't think that will be a problem.

I tried installing the pyopenssl pip package in a plain docker container without OpenSSL installed and it failed as expected, so I think it's fair to assume this is all that's needed to ensure OpenSSL is present.

sbscully added 2 commits May 6, 2020 11:30
Ensures the package will not install on python versions without SSL
@sbscully

sbscully commented May 6, 2020

Copy link
Copy Markdown
ContributorAuthor

I've bumped a minor version and added to the changelog. I think this should be OK for merging now. Edit: I'll just add the backoff changes to this pull request.

@sbscullysbscully changed the title Require pyopensslRequire pyopenssl and add request backoffMay 6, 2020
@sbscully

Copy link
Copy Markdown
ContributorAuthor

@mtmail I've added exponential backoff with jitter, max retries 5 and max time 120s. Only issue now is that this makes the tests take 20x longer to run, will fix that now. I couldn't think of a good way to test this directly, any ideas?

The failing test run is for pypy only, it is complaining about an out of date OpenSSL, not sure if I introduced that failure or it was already failing?

@sbscully

Copy link
Copy Markdown
ContributorAuthor

@mtmail the tests only take a couple of seconds now. I also added generic requests.exceptions.RequestException exceptions to the backoff behaviour.

I think this is ready to merge now, let me know if you want me to make any changes.

@sbscully

Copy link
Copy Markdown
ContributorAuthor

@mtmail Changing to bionic fixed the OpenSSL issue on travis, but it broke python 2.7 and pypy3 still didn't pass. I've reverted to the original config with trusty/xenial.

@mtmail
mtmail merged commit 660b1b6 into masterMay 6, 2020
@mtmail
mtmail deleted the openssl branch August 12, 2024 12:22
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@sbscully@mtmail