| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
(GH-26950)
|
|
|
|
| |
objects (GH-19946)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Remove:
* COUNT_ALLOCS macro
* sys.getcounts() function
* SHOW_ALLOC_COUNT code in listobject.c
* SHOW_TRACK_COUNT code in tupleobject.c
* PyConfig.show_alloc_count field
* -X showalloccount command line option
* @test.support.requires_type_collecting decorator
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The implementation of weakref.proxy's methods call back into the Python
API using a borrowed references of the weakly referenced object
(acquired via PyWeakref_GET_OBJECT). This API call may delete the last
reference to the object (either directly or via GC), leaving a dangling
pointer, which can be subsequently dereferenced.
To fix this, claim a temporary ownership of the referenced object when
calling the appropriate method. Some functions because at the moment they
do not need to access the borrowed referent, but to protect against
future changes to these functions, ownership need to be fixed in
all potentially affected methods.
|
|
|
|
|
| |
weakref.WeakValueDictionary defines a local remove() function used as
callback for weak references. This function was created with a
closure. Modify the implementation to avoid the closure.
|
|
|
|
| |
They now return NotImplemented for unsupported type of the other operand.
|
|
|
| |
Turn deprecation warnings added in 3.8 into TypeError.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Deprecated passing the following arguments as keyword arguments:
- "func" in functools.partialmethod(), weakref.finalize(),
profile.Profile.runcall(), cProfile.Profile.runcall(),
bdb.Bdb.runcall(), trace.Trace.runfunc() and
curses.wrapper().
- "function" in unittest.addModuleCleanup() and
unittest.TestCase.addCleanup().
- "fn" in the submit() method of concurrent.futures.ThreadPoolExecutor
and concurrent.futures.ProcessPoolExecutor.
- "callback" in contextlib.ExitStack.callback(),
contextlib.AsyncExitStack.callback() and
contextlib.AsyncExitStack.push_async_callback().
- "c" and "typeid" in the create() method of multiprocessing.managers.Server
and multiprocessing.managers.SharedMemoryServer.
- "obj" in weakref.finalize().
Also allowed to pass arbitrary keyword arguments (even "self" and "func")
if the above arguments are passed as positional argument.
|
|
|
|
|
|
|
|
|
|
| |
Protect dict iterations by wrapping them with _IterationGuard in the
following methods:
- WeakValueDictionary.copy()
- WeakValueDictionary.__deepcopy__()
- WeakKeyDictionary.copy()
- WeakKeyDictionary.__deepcopy__()
|
|
|
| |
Fix typos found by codespell in docs, docstrings, and comments.
|
|
|
|
|
|
| |
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
|
|\
| |
| |
| | |
WeakValueDictionary when collecting from another thread.
|
| |
| |
| |
| | |
WeakValueDictionary when collecting from another thread.
|
|\ \
| |/
| |
| |
| |
| |
| |
| | |
WeakValueDictionary.pop()
when a GC collection happens in another thread.
Original patch and report by Armin Rigo.
|
| |
| |
| |
| |
| |
| |
| |
| | |
WeakValueDictionary.pop()
when a GC collection happens in another thread.
Original patch and report by Armin Rigo.
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #27350: `dict` implementation is changed like PyPy. It is more compact
and preserves insertion order.
_PyDict_Dummy() function has been removed.
Disable test_gdb: python-gdb.py is not updated yet to the new structure of
compact dictionaries (issue #28023).
Patch written by INADA Naoki.
|
|/
|
|
| |
is correct, not 3110).
|
| |
|
|
|
|
| |
Patch by Georg Brandl.
|
|\ |
|
| |
| |
| |
| |
| |
| | |
This changes the main documentation, doc strings, source code comments, and a
couple error messages in the test suite. In some cases the word was removed
or edited some other way to fix the grammar.
|
|\ \
| |/
| |
| | |
now accept the self and the dict keyword arguments.
|
| |
| |
| |
| | |
now accept the self and the dict keyword arguments.
|
| |
| |
| |
| | |
Patch by Christie Wilson.
|
|\ \
| |/
| |
| | |
with an iterator alive.
|
| |
| |
| |
| | |
with an iterator alive.
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| | |
type) can now be weakref'ed. Patch by Wei Wu.
|
|/
|
|
| |
when contain an id in form " at 0x...".
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
weakref callbacks.
This is 2e446e87ac5b except that collections/__init__.py has been
modified to import proxy from _weakref instead of weakref. This
eliminates an import cycle which seems to cause a problem on Unix but
not Windows.
|
| | |
|
| |
| |
| |
| | |
weakref callbacks.
|
| | |
|
|\ \
| |/
| |
| |
| |
| | |
the object could remain reachable through its weakref even though its refcount had dropped to zero.
Thanks to Eugene Toder for diagnosing and reporting the issue.
|
| |
| |
| |
| |
| |
| | |
the object could remain reachable through its weakref even though its refcount had dropped to zero.
Thanks to Eugene Toder for diagnosing and reporting the issue.
|
|/
|
|
| |
references to bound methods.
|
|
|
|
| |
Also add tests for ordering and hashing.
|
|
|
|
|
|
|
| |
WeakValueDictionary) to return a better approximation when some objects are dead or dying.
Moreover, the implementation is now O(1) rather than O(n).
Thanks to Yury Selivanov for reporting.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Merged revisions 79535 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79535 | antoine.pitrou | 2010-03-31 23:32:15 +0200 (mer., 31 mars 2010) | 5 lines
Issue #8268: Old-style classes (not just instances) now support weak
references.
........
|
| |
|
|
|
|
| |
A patch from Dave Malcolm.
|
|
|
|
| |
the destruction of weakref'ed objects while iterating.
|