requests-threads icon indicating copy to clipboard operation
requests-threads copied to clipboard

Can't pass in a deferred to session.run under Python 3

Open mjpieters opened this issue 6 years ago • 0 comments

The session.run() function has no path for a non-coroutine function being passed in, it'll simply return without calling twisted.react():

https://github.com/requests/requests-threads/blob/b4d4384da96b09a98c97abb07b38caa72f5404cf/requests_threads.py#L61-L72

Under Python 3, line 63 is True, but if line 65 is False (so f is not a coroutine function) , the function ends. Should the else on line 70 be dropped, and lines 71 and 72 unindented?

mjpieters avatar Sep 06 '19 16:09 mjpieters