VOLTTRON / volttron

VOLTTRON Distributed Control System Platform
https://volttron.readthedocs.io/
Other
458 stars 216 forks source link

Test use of requests package in agent and test case #2980

Open schandrika opened 2 years ago

schandrika commented 2 years ago

Latest version of pika could cause gevent blocking call exception ( gevent.exceptions.BlockingSwitchOutError: Impossible to call blocking function in the event loop callback ) if agents/tests use 'import requests'. This is because of order of import of requests/grequest package which monkey patches ssl. Best is to switch to using grequests, if not import of request could be moved to inside the method where applicable.

craig8 commented 2 years ago

From what I have read you can use requests, but grequests MUST be referenced in the import chain first. In the non-auth version I have updated the test_vc module to use grequests instead.