[issue26881] modulefinder should reuse the dis module

2016-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Victor. Fixed. > IMHO it's worth to add an optional argument to skip extended opcodes in _unpack_opcodes() to simplify the code in modulefinder. But this would complicate the code in dis. If the disassembler would changed to skip extended opcodes,

[issue26881] modulefinder should reuse the dis module

2016-05-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset d60040b3bb8c by Serhiy Storchaka in branch '3.5': Removed duplicated NEWS entity for issue #26881. https://hg.python.org/cpython/rev/d60040b3bb8c -- ___ Python tracker

[issue26881] modulefinder should reuse the dis module

2016-05-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset f0a4d563b32e by Serhiy Storchaka in branch '3.5': Issue #26881: Restored the name of scan_opcodes_25(). https://hg.python.org/cpython/rev/f0a4d563b32e -- ___ Python tracker

[issue26881] modulefinder should reuse the dis module

2016-05-11 Thread STINNER Victor
STINNER Victor added the comment: It looks like the change is mentionned twice in Misc/NEWS. IMHO it's worth to add an optional argument to skip extended opcodes in _unpack_opcodes() to simplify the code in modulefinder. Is the scancode method public? If yes, I'm not sure that it's ok to rename

[issue26881] modulefinder should reuse the dis module

2016-05-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue26881] modulefinder should reuse the dis module

2016-05-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3579cdaf56d9 by Serhiy Storchaka in branch '3.5': Issue #26881: The modulefinder module now supports extended opcode arguments. https://hg.python.org/cpython/rev/3579cdaf56d9 New changeset c27e3773d0f9 by Serhiy Storchaka in branch 'default': Issue

[issue26881] modulefinder should reuse the dis module

2016-05-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added test. But this test is fragile. Clever optimizer can made it passing even with modulefinder not supporting extended args (I'm going to provide such optimization). -- Added file: http://bugs.python.org/file42735/dis_unpack_args_3.patch ___

[issue26881] modulefinder should reuse the dis module

2016-05-04 Thread Meador Inge
Meador Inge added the comment: Overall, this patch LGTM. Some new tests would be nice. Especially since the NEWS entry claims that we now support extended args. As for for the compatibility concerns, I don't know. -- nosy: +meador.inge ___ Python

[issue26881] modulefinder should reuse the dis module

2016-05-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: modulefinder in 2.7 should be compatible with Python 2.2 (see PEP 291). Thus we can't just add new function in dis and reuse it in modulefinder. We should duplicate this function in modulefinder. I don't know if there is corresponding rule for 3.x. Should mo

[issue26881] modulefinder should reuse the dis module

2016-05-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is pretty simple patch and I'm going to push it in short time if there are no objections. This can make the patch for issue26647 simpler since handling extended args is isolated in one function. Alternative names for _unpack_args() are welcome. An alte

[issue26881] modulefinder should reuse the dis module

2016-04-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch adds private helper function dis._unpack_args() that unpacks long arguments. This function is now reused in two places in dis and in modulefinder. -- components: +Library (Lib) keywords: +patch stage: -> patch review type: -> behavio

[issue26881] modulefinder should reuse the dis module

2016-04-28 Thread STINNER Victor
New submission from STINNER Victor: The scan_opcodes_25() method of the modulefinder module implements a disassembler of Python bytecode. The implementation is incomplete, it doesn't support EXTENDED_ARG. I suggest to drop the disassembler and reuse the dis module. See also the issue #26647 "