New submission from Brett Rosen:
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>
----------
components: asyncio
messages: 257119
nosy: Brett Rosen, gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: Bug in asyncio.corotuines._format_coroutine
versions: Python 3.4
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue25966>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com