Skip to content

compatible pyopenssl and cryptography

Jimmy F requested to merge pin-pyopenssl into master

Before raising this MR, consider whether the following are required, and complete if so:

  • Unit tests
  • Metrics
  • Documentation update(s)

If not required, please explain in brief why not.

Description

The python package cryptography>= 38.0.0 is incompatible with pyOpenSSL<22.0.0.
This issue is discussed in this pyOpenSSL thread: See pin maximum version cryptography to prevent breaking changes.
Consequently, there's a possibility that running the unit-test container can fail depending on the versions of packages in the environment, yielding to error messages like this:

[2022-09-28T13:29:13.028Z] bgd_unit_tests_1   | tests/server_instance.py:35: in <module>
[2022-09-28T13:29:13.028Z] bgd_unit_tests_1   | /opt/bb/lib/python3.8/site-packages/OpenSSL/crypto.py:1537: in X509StoreFlags
[2022-09-28T13:29:13.028Z] bgd_unit_tests_1   |     CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
[2022-09-28T13:29:13.028Z] bgd_unit_tests_1   | E   AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
[2022-09-28T13:29:13.028Z] bgd_unit_tests_1   | __________________ ERROR collecting tests/server_instance.py ___________________

To guarantee compatibility, simply requires cryptography>= 38.0.0 and pyOpenSSL>=22.0.0

Changes proposed in this merge request:

  • requirements for test pins to cryptography>= 38.0.0 and pyOpenSSL>=22.0.0
  • requirements for all pins to cryptography>= 38.0.0 and pyOpenSSL>=22.0.0

Validation

  • Pass CI/CD
  • Pass local testing ran with python3.8 setup.py test

Merge request reports