Message257119
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> |
|
Date |
User |
Action |
Args |
2015-12-28 16:58:36 | Brett Rosen | set | recipients:
+ Brett Rosen, gvanrossum, vstinner, yselivanov |
2015-12-28 16:58:36 | Brett Rosen | set | messageid: <1451321916.38.0.909641421844.issue25966@psf.upfronthosting.co.za> |
2015-12-28 16:58:36 | Brett Rosen | link | issue25966 messages |
2015-12-28 16:58:35 | Brett Rosen | create | |
|