This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Brett Rosen
Recipients Brett Rosen, gvanrossum, vstinner, yselivanov
Date 2015-12-28.16:58:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1451321916.38.0.909641421844.issue25966@psf.upfronthosting.co.za>
In-reply-to
Content
When running some test cases via py.test and using a coroutine created inside of cythonized code, I get the following:

   def _format_coroutine(coro):
        assert iscoroutine(coro)
        coro_name = getattr(coro, '__qualname__', coro.__name__)
    
        filename = coro.gi_code.co_filename
        if (isinstance(coro, CoroWrapper)
        and not inspect.isgeneratorfunction(coro.func)):
>           filename, lineno = events._get_function_source(coro.func)
E           TypeError: 'NoneType' object is not iterable


This appears to be because this line:

https://github.com/python/asyncio/blob/2a19f9329f4ee710fef7728b316aa4fe1d07dbef/asyncio/coroutines.py#L289

Is expecting to get back two values, but because of:

https://github.com/python/asyncio/blob/master/asyncio/events.py#L35

This it only gets back None.


> /usr/local/lib/python3.4/asyncio/events.py(25)_get_function_source()
-> if _PY34:
(Pdb) func
<cyfunction ProgressTracker._do_report at 0x7fdd2fc46498>
History
Date User Action Args
2015-12-28 16:58:36Brett Rosensetrecipients: + Brett Rosen, gvanrossum, vstinner, yselivanov
2015-12-28 16:58:36Brett Rosensetmessageid: <1451321916.38.0.909641421844.issue25966@psf.upfronthosting.co.za>
2015-12-28 16:58:36Brett Rosenlinkissue25966 messages
2015-12-28 16:58:35Brett Rosencreate