[issue28430] asyncio: C implemeted Future cause Tornado test fail

Yury Selivanov report at bugs.python.org
Fri Oct 21 17:00:01 EDT 2016


Yury Selivanov added the comment:

The patch looks good.  2 things:

- It appears it also touches Misc/NEWS a bit too much. Please make sure to not to commit that.

- I'd also add a comment explaining why we ignore values passed to FI.send() and simply send None.  The reason is how Future.__iter__ is designed:

   class Future:
      def __iter__(self):
        if not self.done():
            self._asyncio_future_blocking = True
            yield self  # This tells Task to wait for completion.
        assert self.done(), "yield from wasn't used with future"
        return self.result()  # May raise too.

^-- Future.__iter__ doesn't care about values that are pushed to the generator, it just returns "self.result()".

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28430>
_______________________________________


More information about the Python-bugs-list mailing list