diff -r 8f72bf88f471 Lib/asyncio/futures.py --- a/Lib/asyncio/futures.py Sat Feb 20 12:59:36 2016 -0800 +++ b/Lib/asyncio/futures.py Sun Feb 21 11:48:11 2016 +1100 @@ -341,6 +341,8 @@ raise InvalidStateError('{}: {!r}'.format(self._state, self)) if isinstance(exception, type): exception = exception() + if isinstance(exception, StopIteration): + raise TypeError("Futures cannot raise StopIteration") self._exception = exception self._state = _FINISHED self._schedule_callbacks()