Merge 3.5 (issue #28634)

This commit is contained in:
Yury Selivanov 2016-11-07 16:07:30 -05:00
commit 6130c0271f
3 changed files with 27 additions and 1 deletions

View file

@ -27,7 +27,8 @@ def isfuture(obj):
itself as duck-type compatible by setting _asyncio_future_blocking.
See comment in Future for more details.
"""
return getattr(obj, '_asyncio_future_blocking', None) is not None
return (hasattr(obj.__class__, '_asyncio_future_blocking') and
obj._asyncio_future_blocking is not None)
def _format_callbacks(cb):