You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/txaio/files/txaio-2.7.1.f._result.patch

37 lines
1.1 KiB

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