[New-bugs-announce] [issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects
George Collins
report at bugs.python.org
Fri Aug 11 11:21:31 EDT 2017
New submission from George Collins:
Issue 21947 informed the `dis` module about the `gi_code` attribute, which stores code objects for generator objects. This allows inspection of generator objects, not just functions which return them. However, asynchronous generator objects use `ag_code` and coroutine objects use `cr_code`, so dis raises a TypeError on them. I'm making a pull request to extend the generator behavior to async generators and coroutines.
Credit to Luciano Ramalho: I tripped over this at his (great) concurrency workshop at PyBay 2017 and he identified exactly what was happening and suggested a patch.
----------
components: Extension Modules
messages: 300167
nosy: George Collins
priority: normal
severity: normal
status: open
title: `Dis` module doesn't know how to disassemble async generator or coroutine objects
type: enhancement
versions: Python 3.6, Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31183>
_______________________________________
More information about the New-bugs-announce
mailing list