summaryrefslogtreecommitdiff
blob: 8c72b45e48de43647985cdd53e0ee80973b23d0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 7ecd9cbb4e7202f7c583f9080ac13db94672bc4b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= <alex.gronholm@nextday.fi>
Date: Thu, 4 May 2017 21:47:02 +0300
Subject: [PATCH] Removed code that sets f._result

This stopped working from Python 3.6 onwards, as the Future implementation is now written in C.
---
 txaio/aio.py | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/txaio/aio.py b/txaio/aio.py
index 55d3ca5..becfba5 100644
--- a/txaio/aio.py
+++ b/txaio/aio.py
@@ -437,17 +437,12 @@ class _AsyncioApi(object):
         """
         callback or errback may be None, but at least one must be
         non-None.
-
-        XXX beware the "f._result" hack to get "chainable-callback" type
-        behavior.
         """
         def done(f):
             try:
                 res = f.result()
                 if callback:
-                    x = callback(res)
-                    if x is not None:
-                        f._result = x
+                    callback(res)
             except Exception:
                 if errback:
                     errback(create_failure())
-- 
2.13.0