[issue17643] Expose weakref callback for introspection purposes.

2013-04-13 Thread Mark Dickinson
Mark Dickinson added the comment: Committed, using support.gc_collect for the test that requires garbage collection. Thanks for the reviews! -- assignee: -> mark.dickinson resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _

[issue17643] Expose weakref callback for introspection purposes.

2013-04-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9e7d31b04d78 by Mark Dickinson in branch 'default': Issue #17643: Add __callback__ attribute to weakref.ref. http://hg.python.org/cpython/rev/9e7d31b04d78 -- nosy: +python-dev ___ Python tracker

[issue17643] Expose weakref callback for introspection purposes.

2013-04-12 Thread Mark Dickinson
Mark Dickinson added the comment: Ah, test.support.gc_collect looks useful. Thanks! -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue17643] Expose weakref callback for introspection purposes.

2013-04-12 Thread Richard Oudkerk
Richard Oudkerk added the comment: > I could mark the new test as cpython only, or add a gc.collect (but I'm > not sure if the latter is enough, either). test.support.gc_collect() should work on non-refcounted implementations. -- nosy: +sbt ___ Pyth

[issue17643] Expose weakref callback for introspection purposes.

2013-04-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: > there are other tests in that test module that also rely on del resulting in > immediate cleanup I would mark them all as 'cpython-only', since they are. Other implementation must be omitting this test module, ignoring its failures, or patching out the spec

[issue17643] Expose weakref callback for introspection purposes.

2013-04-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ah, then we can probably keep using the same style. -- ___ Python tracker ___ ___ Python-bugs-list m

[issue17643] Expose weakref callback for introspection purposes.

2013-04-06 Thread Mark Dickinson
Mark Dickinson added the comment: True: I'm not sure what to do about that---there are other tests in that test module that also rely on del resulting in immediate cleanup. I'm not sure what other implementations are currently doing with this test module. I could mark the new test as cpython

[issue17643] Expose weakref callback for introspection purposes.

2013-04-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: "del x" will not be enough on non-refcounted implementations. -- ___ Python tracker ___ ___ Python-b

[issue17643] Expose weakref callback for introspection purposes.

2013-04-06 Thread Mark Dickinson
Mark Dickinson added the comment: Ah yes; that's easier. New patch including doc updates. -- Added file: http://bugs.python.org/file29687/weakref___callback__2.patch ___ Python tracker

[issue17643] Expose weakref callback for introspection purposes.

2013-04-06 Thread Benjamin Peterson
Benjamin Peterson added the comment: Instead of a getset, I think you just use a read-only T_OBJECT member. -- nosy: +benjamin.peterson ___ Python tracker ___ ___

[issue17643] Expose weakref callback for introspection purposes.

2013-04-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Sounds fine to me. -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue17643] Expose weakref callback for introspection purposes.

2013-04-06 Thread Mark Dickinson
New submission from Mark Dickinson: It would be nice to be able to access the callback of a weakref as an attribute on the weakref itself. For example: Python 3.4.0a0 (default:2bf154ca43c6+, Apr 6 2013, 13:31:29) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credit