optimizely / python-sdk

Python SDK for Optimizely Feature Experimentation and Optimizely Full Stack (legacy)
https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/python-sdk
Apache License 2.0
32 stars 36 forks source link

ci: fix cryptography wheel build for pypy and pypy3 #318

Closed oakbani closed 3 years ago

oakbani commented 3 years ago

Summary

Unit tests on Python pypy and pypy3 have been failing consistently for quite some time. On detailed investigation, cryptography package is required by the requests[security] module. Although the latest cryptography version does support pypy, it doesn't build for some reason.

Setting cryptography package to a static previous version revealed that Python 3.4 support has been dropped after cryptography 2.8. Therefore, in this PR we specify version bounds that support all of our supported python versions.

Test plan

All checks continue to pass.

Issues

coveralls commented 3 years ago

Coverage Status

Coverage remained the same at 95.883% when pulling 47b67cc4bd0a9b6888e3125485216d4791dcd31a on oakbani/fix-pypy into 5fefd2b7f07865ffbe117289ef34aabbb4c98be1 on master.

Mat001 commented 3 years ago

@oakbani LGTM. Keep in mind that I had to rerun pypy3 unit tests 5 times before they passed. A single tests was failing (polling manager) until it passed (flakey?). I noticed that same test failed occasionally in previous builds but not sure if it's 4/5 runs or less flakey.

I doub't that cryptography version update causes that test to frequently fail...

oakbani commented 3 years ago

@Mat001 Yeah, this flaky test has been always there. It's not related to this cryptography fix. This flaky test occurs more on the pypy versions as compared to other python versions. We should address this test in a separate PR

oakbani commented 3 years ago

Closing in favor of https://github.com/optimizely/python-sdk/pull/320