| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
(cherry picked from commit 8463cb55dabb78571e32d8c8c7de8679ab421c2c)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
|
|
| |
(GH-93719) (GH-94071)
Classes ReferenceType, ProxyType and CallableProxyType have now correct
atrtributes __module__, __name__ and __qualname__.
It makes them (types, not instances) pickleable.
(cherry picked from commit 8352e322e87ba39c71e578b65ad8ae156ca3e0c7)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
| |
Fix typos in the Lib directory as identified by codespell.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>.
(cherry picked from commit 745c9d9dfc1ad6fdfdf1d07420c6273ff67fa5be)
Co-authored-by: Christian Clauss <cclauss@me.com>
|
|
|
|
|
|
|
| |
(GH-28005) (GH-28027)
(cherry picked from commit 2a8127cafe1d196f858a3ecabf5f1df3eebf9a12)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
| |
(GH-27316) (GH-27324)
(cherry picked from commit 5370f0a82aaa4ba617070d5c71d2b18236096ac0)
Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
|
|
|
|
|
|
|
| |
(GH-26950)
(cherry picked from commit e2fea101fd5517f33371b04432842b971021c3bf)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
| |
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.
|