Fix for issue #487, including a regression test that checks the
existence of select.poll before and after loading requests.async.
raise RuntimeError('Gevent is required for requests.async.')
# Monkey-patch.
-curious_george.patch_all(thread=False)
+curious_george.patch_all(thread=False, select=False)
from . import api
import sys
import unittest
+import select
+has_poll = hasattr(select, "poll")
+
from requests import async
import envoy
async.map
async.send
+ def test_select_poll(self):
+ """Test to make sure we don't overwrite the poll"""
+ self.assertEqual(hasattr(select, "poll"), has_poll)
if __name__ == '__main__':
unittest.main()