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

2017-03-31 Thread Donald Stufft

Changes by Donald Stufft :


--
pull_requests: +904

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-10-25 Thread INADA Naoki

INADA Naoki added the comment:

I'm sorry about my bad English.

> Fix iterator of C implemented asyncio.Future

This meant:

fut = asyncio.Future()  # C implemented version of asyncio.Future
it = iter(fut)  # Iterator of it
it.send(42) # raised TypeError before. It was not compatible with Python 
version of asyncio.Future

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-10-25 Thread Terry J. Reedy

Terry J. Reedy added the comment:

+- Issue #28430: Fix iterator of C implemented asyncio.Future doesn't accept

+  non-None value is passed to it.send(val).

This NEWS entry is not a coherent English sentence.  Please revise.  I don't 
understand it well enough to suggest a revision, but would review a replacement.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-10-25 Thread INADA Naoki

INADA Naoki added the comment:

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

I wont to move move this entry from "Core and Builtins" section to "Library" 
section:

- Issue #26081: Added C implementation of asyncio.Future.
  Original patch by Yury Selivanov.

May I do it?

--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-10-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b471447352ac by INADA Naoki in branch '3.6':
Issue #28430: Fix iterator of C implemented asyncio.Future doesn't
https://hg.python.org/cpython/rev/b471447352ac

New changeset bd141ec2973a by INADA Naoki in branch 'default':
Issue #28430: Fix iterator of C implemented asyncio.Future doesn't
https://hg.python.org/cpython/rev/bd141ec2973a

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-10-21 Thread Yury Selivanov

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-10-20 Thread INADA Naoki

INADA Naoki added the comment:

Test failure in GNS3 seems not relating to this.
It may be fixed via #28492, maybe.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-10-20 Thread INADA Naoki

INADA Naoki added the comment:

pure Python Future.__iter__ don't use what yield-ed.

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.

I felt no-None value is sent by iter.send(val) wasn't make sense.
But Tornado did it (maybe, for compatibility to Tornado's generator.)

So this patch ignores when non-None value is passed.
Additionally, I moved NEWS entry about C Future from "core and builtin"
section to "library" section.

--
keywords: +patch
stage:  -> commit review
Added file: http://bugs.python.org/file45165/future-iter-send.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-10-14 Thread INADA Naoki

INADA Naoki added the comment:

Another test failure is reported.

> I have setup a 3.6 build on Travis of our project GNS3 and it seem to fail.
> https://travis-ci.org/GNS3/gns3-server/builds/167703118

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-10-14 Thread Марк Коренберг

Changes by Марк Коренберг :


--
nosy: +mmarkk

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-10-13 Thread INADA Naoki

New submission from INADA Naoki:

https://travis-ci.org/tornadoweb/tornado/jobs/167252979

--
assignee: inada.naoki
components: asyncio
messages: 278569
nosy: gvanrossum, inada.naoki, yselivanov
priority: high
severity: normal
status: open
title: asyncio: C implemeted Future cause Tornado test fail
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com