Skip to content

Commit 74ce9fa

Browse files
authored
Merge pull request #116 from pusher/tornado-future-rename
Use tornado.concurrent.Future instead of tornado.concurrent.Traceback.Future
2 parents b644014 + d849658 commit 74ce9fa

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

pusher/tornado.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import tornado
1111
import tornado.httpclient
1212

13-
from tornado.concurrent import TracebackFuture
13+
from tornado.concurrent import Future
1414

1515
from pusher.http import process_response
1616

@@ -30,13 +30,10 @@ def send_request(self, request):
3030
method = request.method
3131
data = request.body
3232
headers = {'Content-Type': 'application/json'}
33-
future = TracebackFuture()
33+
future = Future()
3434

3535
def process_response_future(response):
36-
if response.exc_info() is not None:
37-
future.set_exc_info(response.exc_info())
38-
39-
elif response.exception() is not None:
36+
if response.exception() is not None:
4037
future.set_exception(response.exception())
4138

4239
else:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
extras_require={
4949
'aiohttp': ['aiohttp>=0.20.0'],
50-
'tornado': ['tornado>=4.0.0']
50+
'tornado': ['tornado>=5.0.0']
5151
},
5252

5353
package_data={

0 commit comments

Comments
 (0)