File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 21
21
$PYTHON -m virtualenv pyopenssltest
22
22
trap " deactivate; rm -rf pyopenssltest" EXIT HUP
23
23
. pyopenssltest/bin/activate
24
- pip install pyopenssl> =17.2.0 service_identity> =18.1.0
24
+ pip install pyopenssl> =17.2.0 " requests<3.0.0 " service_identity> =18.1.0
25
25
pip list
26
26
python -c ' import sys; print(sys.version)'
27
27
python setup.py test
Original file line number Diff line number Diff line change 43
43
44
44
_HAVE_PYOPENSSL = False
45
45
try :
46
+ # All of these must be available to use PyOpenSSL
46
47
import OpenSSL
48
+ import requests
49
+ import service_identity
47
50
_HAVE_PYOPENSSL = True
48
51
except ImportError :
49
52
pass
@@ -190,8 +193,7 @@ def test_ssl_pem_passphrase(self):
190
193
#
191
194
# --sslPEMKeyFile=/path/to/pymongo/test/certificates/server.pem
192
195
# --sslCAFile=/path/to/pymongo/test/certificates/ca.pem
193
- vi = sys .version_info
194
- if vi [0 ] == 2 and vi < (2 , 7 , 9 ) and not _ssl .IS_PYOPENSSL :
196
+ if not hasattr (ssl , 'SSLContext' ) and not _ssl .IS_PYOPENSSL :
195
197
self .assertRaises (
196
198
ConfigurationError ,
197
199
MongoClient ,
You can’t perform that action at this time.
0 commit comments