This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年05月28日 13:17 by pitrou, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg161780 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年05月28日 13:17 | |
In http://docs.python.org/dev/extending/newtypes.html?highlight=pyobject_clearweakrefs#weak-reference-support, you can read: "The only further addition is that the destructor needs to call the weak reference manager to clear any weak references. This should be done before any other parts of the destruction have occurred" I don't believe there is any need to clear weakrefs before starting with other parts of the destruction. Weakref callbacks cannot access the original object, by construction (else they never get called). Actually, if a weakref callback can rely on some resources having been released (say, a file descriptor), it is better to clear the weakrefs *after* other parts of the destruction. This seems to be a by-product of the erroneous doc committed in SVN r16381, part of which was removed in r18223. |
|||
| msg162922 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年06月15日 17:15 | |
New changeset 69177ff1a643 by Antoine Pitrou in branch '3.2': Issue #14933: fix misleading doc about weakref support in extension types. http://hg.python.org/cpython/rev/69177ff1a643 New changeset b17c8005e08a by Antoine Pitrou in branch 'default': Issue #14933: fix misleading doc about weakref support in extension types. http://hg.python.org/cpython/rev/b17c8005e08a New changeset 0ac1f90954dc by Antoine Pitrou in branch '2.7': Issue #14933: fix misleading doc about weakref support in extension types. http://hg.python.org/cpython/rev/0ac1f90954dc |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:30 | admin | set | github: 59138 |
| 2012年06月15日 17:16:14 | pitrou | set | status: open -> closed resolution: fixed stage: resolved |
| 2012年06月15日 17:15:58 | python-dev | set | nosy:
+ python-dev messages: + msg162922 |
| 2012年05月28日 13:17:39 | pitrou | create | |