[issue15456] Correct __sizeof__ support for code objects
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15456 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15456] Correct __sizeof__ support for code objects
Serhiy Storchaka storch...@gmail.com added the comment: Thank you for fast commiting. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15456 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15456] Correct __sizeof__ support for code objects
New submission from Serhiy Storchaka storch...@gmail.com: Here is a patch that implements __sizeof__ for code objects (PyCodeObject) counting co_cell2arg array. -- components: Interpreter Core files: code_sizeof.patch keywords: patch messages: 166469 nosy: storchaka priority: normal severity: normal status: open title: Correct __sizeof__ support for code objects type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file26523/code_sizeof.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15456 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15456] Correct __sizeof__ support for code objects
Serhiy Storchaka storch...@gmail.com added the comment: See also issue12399. -- nosy: +benjamin.peterson, ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15456 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15456] Correct __sizeof__ support for code objects
Martin v. Löwis mar...@v.loewis.de added the comment: Interestingly, the original patch did change the sizeof test, but incorrectly (adding the extra pointer to the struct spec, but failing to recognize that there is additional memory allocated). This tells me a) we *absolutely* need to preserve the current testing style where the test cases count the individual fields (see issue15402 for the related discussion). Had the test used object.__sizeof__, it would not have needed any change to continue to pass, losing all hope that somebody might have detected it except by very careful review. b) the trigger that the test broke apparently was not sufficient to hint Benjamin that the sizeof implementation may be incorrect, he just assumed that the test was incorrect. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15456 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15456] Correct __sizeof__ support for code objects
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 5093cfdff2a9 by Martin v. Löwis in branch 'default': Issue #15456: Fix code __sizeof__ after #12399 change. http://hg.python.org/cpython/rev/5093cfdff2a9 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15456 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15456] Correct __sizeof__ support for code objects
Martin v. Löwis mar...@v.loewis.de added the comment: Thanks for the patch! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15456 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com