Removed code that sets f._result

This stopped working from Python 3.6 onwards, as the Future implementation is now written in C.
This commit is contained in:
Alex Grönholm 2017-05-04 21:47:02 +03:00 committed by GitHub
parent 1d5b186ae9
commit 7ecd9cbb4e
1 changed files with 1 additions and 6 deletions

View File

@ -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())