Remove the upper version bound on pymongo#31189
Conversation
There was an upper version bound on pymongo of `<4.0.0` because versions 4.0.0+ removed the `ssl_cert_reqs` parameter from client connection options. However, comparing the pymongo 3.7.0 docs (https://pymongo.readthedocs.io/en/3.7.0/examples/tls.html#certificate-verification-policy) to the 4.3.3 docs (https://pymongo.readthedocs.io/en/4.3.3/examples/tls.html#certificate-verification-policy) it seems that `ssl_cert_reqs` has been effectively renamed to `tlsAllowInvalidCertificates`. This PR removes upper version bound on pymongo, and adds a test to set `tlsAllowInvalidCertificates` for pymongo 4.0.0 and later, while continuing to use `ssl_cert_reqs` for earlier versions of pymongo.
|
I am not certain about what to do for testing. It isn’t clear to me that any existing tests actually connect to a live mongodb instance? |
|
Nice! |
Actually we have integration tests with https://github.com/apache/airflow/actions/runs/4945112005/jobs/8841910985#step:11:596 Not sure though if they are comprehensive enough, so maybe good if you take a look as well? It's rather easy to run them locally with breeze: https://github.com/apache/airflow/blob/main/TESTING.rst#airflow-integration-tests |
|
Though in your PR mongo has not been upgraded actually (because it is held back) and the constraints had not updated it: https://github.com/apache/airflow/actions/runs/4940266515/jobs/8837512485?pr=31189#step:5:17770 But this is actually because of
And we will find out today/tomorrow if all is fine, because `apache-beam 2.47 had just been released and we are about to get it upgraded as part of the job in #30067 This |
There was an upper version bound on pymongo of
<4.0.0because versions 4.0.0+ removed thessl_cert_reqsparameter from client connection options. However, comparing the pymongo 3.7.0 docs (https://pymongo.readthedocs.io/en/3.7.0/examples/tls.html#certificate-verification-policy) to the 4.3.3 docs(https://pymongo.readthedocs.io/en/4.3.3/examples/tls.html#certificate-verification-policy) it seems that
ssl_cert_reqshas been effectively renamed totlsAllowInvalidCertificates.This PR removes upper version bound on pymongo, and adds a test to set
tlsAllowInvalidCertificatesfor pymongo 4.0.0 and later, while continuing to usessl_cert_reqsfor earlier versions of pymongo.