| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
In cyclic gc, clear all weakrefs to unreachable objects before allowing any
Python code (weakref callbacks or __del__ methods) to run.
This is a critical bugfix, affecting all versions of Python since weakrefs
were introduced.
|
| |
|
|
|
| |
possible that the callback-less flavors of the ref or proxy could have
been added during GC, so we don't want to replace them.
|
| |
|
|
|
|
|
|
|
| |
the same object to be collected by the cyclic GC support if they are
only referenced by a cycle. If the weakref being collected was one of
the weakrefs without callbacks, some local variables for the
constructor became invalid and have to be re-computed.
The test caused a segfault under a debug build without the fix applied.
|
| |
|
|
|
| |
weakref ref and proxy objects; None was not being treated as identical to
NULL, though it was documented as equivalent.
|
| |
|
|
|
|
|
|
| |
Also SF patch 843455.
This is a critical bugfix, backported from 2.4 development.
I don't intend to backport beyond 2.3 maint. The bugs this fixes
have been there since weakrefs were introduced.
|
| |
|
|
|
| |
"print repr(proxy(a))" and "proxy(a)" at an interactive prompt.
Closes SF bug #722763.
|
| | |
|
| |
|
|
|
|
|
| |
the referenced object, if it has one.
Also use %p to format pointers consistently, and use <weakproxy ...>
in proxy_repr(), to match the type name.
|
| |
|
|
| |
Part of fixing SF bug #591704.
|
| |
|
|
|
| |
management bug. Also, move some duplicated code into the new_weakref
fucntion.
|
| |
|
|
| |
both are proxy objects.
|
| |
|
|
|
|
| |
references, we do not allow any outstanding exceptions "leak" into the
callback's execution state.
This closes SF bug #478534.
|
| |
|
|
| |
PyOS_snprintf() for buffer overrun avoidance.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
the left-hand operand may not be the proxy in all cases. If it isn't,
we end up doing two things: a) unwrapping something that isn't a
PyWeakReference (later resulting in a core dump) and b) passing a
proxy as the right-hand operand anyway, even though that can't be
handled by the actual handler (maybe eventually causing a core dump).
This is fixed by always unwrapping all the proxies involved before
passing anything to the actual handler.
|
| |
|