[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Xiang Zhang. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset d14ea3964590 by Serhiy Storchaka in branch '3.5': Issue #26733: Disassembling a class now disassembles class and static methods. https://hg.python.org/cpython/rev/d14ea3964590 New changeset f96fec10cf25 by Serhiy Storchaka in branch 'default':

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka stage: patch review -> commit review versions: +Python 3.5 ___ Python tracker

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-17 Thread Nick Coghlan
Nick Coghlan added the comment: Looking at the history of the dis module, I'd now class this as a bug fix for 3.5+ - it looks like dis.dis gained the ability to disassemble static and class methods as a side-effect of the removal of bound methods in Python 3 (see

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. Nick, do you consider this as a new feature, or as a fix? -- ___ Python tracker ___

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-12 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your comments Serhiy. I update the patch according to your comments. Actually I don't think this is a new feature. Maybe staticmethod and classmethod are just forgotten. As for separate tests for staticmethod and classmethod, I think they are not

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset b114a0650c44 by Serhiy Storchaka in branch '3.5': Issue #26733: Fixed formatting line numbers in test_dis. https://hg.python.org/cpython/rev/b114a0650c44 New changeset e0816ce68952 by Serhiy Storchaka in branch 'default': Issue #26733: Fixed

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If this is new feature, perhaps the docs need the versionchanged directive. Otherwise the patch should be applied to all maintained branches. Added other comments on Rietveld. -- nosy: +serhiy.storchaka ___

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-11 Thread Xiang Zhang
Xiang Zhang added the comment: I update the documentation. Learning from devguide, the change of whatsnew is the committer's work. ;) -- Added file: http://bugs.python.org/file42439/add_staticmethod_and_classmethod_when_dis.dis_a_class_v4.patch ___

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-11 Thread Nick Coghlan
Nick Coghlan added the comment: The code and test changes in the latest patch look good to me. For documentation, I suggest updating https://docs.python.org/3/library/dis.html#dis.dis to: - say "it disassembles all methods (including class and static methods)" when describing how classes are

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-11 Thread Xiang Zhang
Xiang Zhang added the comment: After researching the code, I think changing ' %-4d' to '%3d' in dis_bug708901 is right. Since I added some some lines and the lineno of test_bug708901 has arrived at 100+ and the leading space should not be there. According to the code of dis.dis, the right

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-11 Thread SilentGhost
Changes by SilentGhost : -- nosy: +ncoghlan, yselivanov stage: -> patch review ___ Python tracker ___

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-11 Thread Xiang Zhang
Xiang Zhang added the comment: Though don't know why but simply replace %-4d with %3d in dis_bug708901 can fix the test. I updated the patch so all the tests pass and then I'll spend some time figuring out why. -- Added file:

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-11 Thread Xiang Zhang
Changes by Xiang Zhang : -- components: +Library (Lib) type: -> behavior versions: +Python 3.6 ___ Python tracker ___

[issue26733] staticmethod and classmethod are ignored when disassemble class

2016-04-11 Thread Xiang Zhang
New submission from Xiang Zhang: Though the documentation tells when disassembling a class, it disassembles all methods for dis.dis, but staticmethod and classmethod are ignored. I don't know whether this is intended. I write to patch to add staticmethod and classmethod. But unfortunately