[Cython] cython 0.23.4 test failure, async_iter_pep492 (), asyncio_generators, test_async_def_future.py

Todd Rme toddrme2178 at gmail.com
Wed Jan 20 13:36:04 EST 2016


On 13 January 2016 at 17:50, Orion Poplawski <orion at
<https://mail.python.org/mailman/listinfo/cython-devel> cora.nwra.com
<https://mail.python.org/mailman/listinfo/cython-devel>> wrote: >* Dimitri
John** Ledkov** <**xnox*
<https://mail.python.org/mailman/listinfo/cython-devel>* at ...*
<https://mail.python.org/mailman/listinfo/cython-devel>*> writes:* > >> >>*
Hello,* >> >>* Building 0.23.4 fails on** ubuntu** with python 3.5.* >> >>*
Full build log is at:* >> >* https*
<https://launchpadlibrarian.net/228728126/buildlog_ubuntu-xenial>*://*
<https://launchpadlibrarian.net/228728126/buildlog_ubuntu-xenial>
*launchpadlibrarian.net*
<https://launchpadlibrarian.net/228728126/buildlog_ubuntu-xenial>
*/228728126/*
<https://launchpadlibrarian.net/228728126/buildlog_ubuntu-xenial>*buildlog*
<https://launchpadlibrarian.net/228728126/buildlog_ubuntu-xenial>*_*
<https://launchpadlibrarian.net/228728126/buildlog_ubuntu-xenial>
*ubuntu-xenial*
<https://launchpadlibrarian.net/228728126/buildlog_ubuntu-xenial> >*
-amd64.**cython**_0.23.4-0ubuntu1_**BUILDING.txt.gz* >> >>* The what i
think relevant portion of the build log is as follows:* >> >>* End-to-end**
asyncio**_generators ... FAIL* >>* runTest** (__main__.**CythonRunTestCase*
*)* >>* compiling (c) and running** attr** ...** attr** ()* >>* Doctest**:**
attr** ... /usr/bin/**python3.5** test_**async**_def_**future.py* >> >>*
Traceback (most recent call last):* >>* File "test_**async**_def_*
*future.py**", line 16, in <module>* >>* runloop**()* >>* File "test_*
*async**_def_**future.py**", line 14, in** runloop* >>* assert events ==
expected, events* >>* AssertionError**: ['setup',** 'setval'**, None]* >> >>*
Any help resolving this would help. Is this a broken** python3.5**? or* >>*
cython**? or both?* > >* We are seeing the same thing building cython
0.23.4 on Fedora rawhide for* >* python 3.5.1:* > >* https://*
<https://kojipkgs.fedoraproject.org//work/tasks/5210/12535210/build.log>
*kojipkgs.fedoraproject.org*
<https://kojipkgs.fedoraproject.org//work/tasks/5210/12535210/build.log>
*//work/tasks/5210/12535210/*
<https://kojipkgs.fedoraproject.org//work/tasks/5210/12535210/build.log>
*build.log*
<https://kojipkgs.fedoraproject.org//work/tasks/5210/12535210/build.log>

We are seeing the same failure on openSUSE, and I think I have worked out
part of the reason why.

I have been playing around with the failing unit test using travis and my
own github fork.  If I enable testing on python 3.5.1 or 3.5-dev the
problem appears there too.  Cython doesn't currently test against these,
which is why the issue wasn't discovered earlier.

I have discovered that the change in behaviour between 3.5 and 3.5.1 occurs
in line 224 of  cython/tests/run/asyncio_generators.srctree

In this line, in python 3.5 the "await fut" statement returned the result
of "fut", 123.  In python 3.5.1+, however, it returns None instead.  The
result value is successfully getting set, as seen by checking
"fut.get_result()" after the await, but the await is not returning it.

You would think this would be an upstream Python problem, so I tried it in
a standalone python interpreter.  However, the problem didn't happen, it
worked as it did in 3.5.  So I went back to the test and changed the
extension of "async_def_future" from "pyx" to "py" and the problem
disappeared!

So somehow cython is doing something different with await than normal
python, and this is causing await to return None in python 3.5.1+.
However, I do not know specifically what this is, or why it behaves
differently in 3.5 and 3.5.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cython-devel/attachments/20160120/f23e47c6/attachment.html>


More information about the cython-devel mailing list