[issue22116] Weak reference support for C function objects

2014-08-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 87f940e85cb0 by Antoine Pitrou in branch 'default': Issue #22116: C functions and methods (of the 'builtin_function_or_method' type) can now be weakref'ed. Patch by Wei Wu. http://hg.python.org/cpython/rev/87f940e85cb0 -- nosy:

[issue22116] Weak reference support for C function objects

2014-08-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: I have committed your patch. Thank you very much for contributing! -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org

[issue22116] Weak reference support for C function objects

2014-08-04 Thread Wei Wu
Wei Wu added the comment: @pitrou, thank you for the review. I have signed the contributor agreement form after submitting this patch. Please let me know if there is a further step to help you to verify the signed contributor agreement. I'm really glad to have the chance to contribute back to

[issue22116] Weak reference support for C function objects

2014-08-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ah, yes, indeed, the agreement seems to have been validated in the meantime (you can see it by the asterisk near your name in the comments here). Thank you! -- ___ Python tracker rep...@bugs.python.org

[issue22116] Weak reference support for C function objects

2014-08-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Wouldn't it be enough to test that one of the builtin functions is now weak referencible? It's better to check that the weakref gets cleared when the object dies, and for that you need an object you can dispose of. --

[issue22116] Weak reference support for C function objects

2014-08-03 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: test needed - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22116 ___ ___

[issue22116] Weak reference support for C function objects

2014-08-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: @kilowu, your patch looks good to me. As a necessary step to include your contribution, could you please sign the contributor's agreement? See https://www.python.org/psf/contrib/contrib-form/ Thank you very much! --

[issue22116] Weak reference support for C function objects

2014-08-02 Thread Anthony Kong
Changes by Anthony Kong anthony.hw.k...@gmail.com: -- nosy: +Anthony.Kong ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22116 ___ ___

[issue22116] Weak reference support for C function objects

2014-08-02 Thread Stefan Behnel
Stefan Behnel added the comment: FWIW, functions in Cython (which C-level-inherit from PyCFunction) support weak references just fine. Adding that as a general feature to PyCFunction sounds like the right thing to do. -- nosy: +scoder ___ Python

[issue22116] Weak reference support for C function objects

2014-08-02 Thread Wei Wu
Wei Wu added the comment: I have made a patch related to this issue, please take a look at it. Thanks :) -- nosy: +kilowu ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22116 ___

[issue22116] Weak reference support for C function objects

2014-08-02 Thread Wei Wu
Changes by Wei Wu we...@cacheme.net: -- keywords: +patch Added file: http://bugs.python.org/file36208/22116.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22116 ___

[issue22116] Weak reference support for C function objects

2014-08-02 Thread Stefan Behnel
Stefan Behnel added the comment: Patch looks ok. Not sure about the test dependency from test_weakref.py to _testcapi, though. Is that module allowed to be used everywhere? Wouldn't it be enough to test that one of the builtin functions is now weak referencible? len seems to be used in other

[issue22116] Weak reference support for C function objects

2014-08-01 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22116 ___

[issue22116] Weak reference support for C function objects

2014-07-31 Thread Antoine Pitrou
New submission from Antoine Pitrou: Currently, it is not possible to take a weakref to a PyCFunction object. However, those objects already have full GC support, so it wouldn't be silly to add weakref support to them. (this came in the context of numba, which generates such C functions

[issue22116] Weak reference support for C function objects

2014-07-31 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- keywords: +easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22116 ___ ___ Python-bugs-list mailing