File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 4040 # can't intercept the error and cause non-fatal exit in case pack
4141 # doesn't declare support for Python 3
4242 shell : /bin/bash
43- command : ~/ci/.circle/test ; ~/ci/.circle/exit_on_py3_checks $?
43+ # eventlet monkey_patch as early as possible (has to be in activate as nosetests gets reinstalled during test phase)
44+ command : |
45+ echo "grep -q monkey_patch ~/virtualenv/bin/nosetests || sed -i -e '/^import re$/i from st2common.util.monkey_patch import monkey_patch\nmonkey_patch()\n' ~/virtualenv/bin/nosetests" >> ~/virtualenv/bin/activate
46+ echo "grep -q pyopenssl\\.inject ~/virtualenv/bin/nosetests || sed -i -e '/^import re$/i from urllib3.contrib import pyopenssl\npyopenssl.inject_into_urllib3()\n' ~/virtualenv/bin/nosetests" >> ~/virtualenv/bin/activate
47+ ~/ci/.circle/test ; ~/ci/.circle/exit_on_py3_checks $?
4448 - save_cache :
4549 key : v1-dependency-cache-py36-{{ checksum "requirements.txt" }}
4650 paths :
Original file line number Diff line number Diff line change 1+ # with requests <=2.23.0, requests forced a re-import of ssl libs.
2+ # Once it stopped doing that, the ssl module was imported somewhere
3+ # before eventlet monkey patching occurred, resulting in some
4+ # infinite recursion errors. Putting this in the base test file
5+ # or in the individual test files was not soon enough. Putting this
6+ # here does, however, seem to be early enough to resolve the errors.
7+ from st2common .util .monkey_patch import monkey_patch
8+
9+ monkey_patch ()
You can’t perform that action at this time.
0 commit comments