[2019/05/20 14:50:43.306] **********************************************************************
|
[2019/05/20 14:50:43.306] File "examples/gevent.rst", line 9, in default
|
[2019/05/20 14:50:43.306] Failed example:
|
[2019/05/20 14:50:43.306] monkey.patch_all()
|
[2019/05/20 14:50:43.306] Expected nothing
|
[2019/05/20 14:50:43.306] Got:
|
[2019/05/20 14:50:43.306] True
|
https://evergreen.mongodb.com/task/mongo_python_driver_tests_doctests__python_version~2.7_doctests_8facf001c031e9911fa56503f7738e9765f978b1_19_05_09_18_59_34
Looks like gevent 1.4.0 changed patch_all to return a boolean which breaks our doctest:
>>> import gevent
|
>>> from gevent import monkey
|
>>> monkey.patch_all()
|
True
|
>>> gevent.__version__
|
'1.4.0'
|
The easy fix is to either ignore the return value which will work on all versions of gevent:
>>> _ = monkey.patch_all()
|
Or rely on gevent 1.4+:
>>> monkey.patch_all()
|
True
|