[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 the community.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22116] Weak reference support for C function objects

2014-08-03 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage: test needed -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 places, for example.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22116] Weak reference support for C function objects

2014-08-02 Thread Wei Wu

Changes by Wei Wu :


--
keywords: +patch
Added file: http://bugs.python.org/file36208/22116.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22116] Weak reference support for C function objects

2014-08-02 Thread Anthony Kong

Changes by Anthony Kong :


--
nosy: +Anthony.Kong

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22116] Weak reference support for C function objects

2014-08-01 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
stage:  -> test needed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22116] Weak reference support for C function objects

2014-07-31 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
keywords: +easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 on-the-fly)

--
components: Interpreter Core
messages: 224432
nosy: pitrou
priority: normal
severity: normal
status: open
title: Weak reference support for C function objects
type: enhancement
versions: Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com