[issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects

2017-08-19 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks for the patch! Issue 31230 is a follow-up issue looking at whether or not we should define a general "__code__" attribute as a general purpose introspection protocol for disassembly support (amongst other generalisations of state introspection support

[issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects

2017-08-19 Thread Nick Coghlan
Changes by Nick Coghlan : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects

2017-08-17 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset fe2b56ab9212c1cf19c48b848fa60f7f201c366f by Nick Coghlan (syncosmic) in branch 'master': bpo-31183: `dis` now handles coroutines & async generators (GH-3077) https://github.com/python/cpython/commit/fe2b56ab9212c1cf19c48b848fa60f7f201c366f

[issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects

2017-08-12 Thread George Collins
George Collins added the comment: Makes sense. I'll update the PR in a bit, and if anyone is hitting this repeatedly and thinks it should be added to 3.6 they can advocate for a policy change in the maintaining-consistency-with-previous-new-features corner case. Thanks, all! --

[issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects

2017-08-12 Thread Nick Coghlan
Nick Coghlan added the comment: While I agree the line is blurry, extending automatic disassembly to cover new types is currently still considered a new feature in the dis module rather than a bug in the addition of those new types to the language. Whether or not that's the *right* policy, or

[issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects

2017-08-12 Thread George Collins
George Collins added the comment: Hm--either/both? I encountered it as a bug ("dis works on my generator object and my async generator function, why does it break on my async generator object?") but strictly speaking it's a new feature (just as issue21947 was). To my mind, adding this level

[issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects

2017-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is this a bug fix or a new feature? Adding support of generators in issue21947 was a new feature and was not backported to older versions. -- ___ Python tracker

[issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects

2017-08-11 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Adding Serhiy and Nick who worked on these parts of CPython. -- nosy: +Mariatta, ncoghlan, serhiy.storchaka stage: -> patch review ___ Python tracker

[issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects

2017-08-11 Thread George Collins
Changes by George Collins : -- pull_requests: +3114 ___ Python tracker ___ ___

[issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects

2017-08-11 Thread George Collins
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`