summaryrefslogtreecommitdiff
path: root/dev-python/txaio/files/txaio-2.7.1.f._result.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/txaio/files/txaio-2.7.1.f._result.patch')
-rw-r--r--dev-python/txaio/files/txaio-2.7.1.f._result.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/dev-python/txaio/files/txaio-2.7.1.f._result.patch b/dev-python/txaio/files/txaio-2.7.1.f._result.patch
new file mode 100644
index 000000000000..8c72b45e48de
--- /dev/null
+++ b/dev-python/txaio/files/txaio-2.7.1.f._result.patch
@@ -0,0 +1,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
+