| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several built-in and standard library types now ensure that their internal result tuples are always tracked by the garbage collector:
- collections.OrderedDict.items
- dict.items
- enumerate
- functools.reduce
- itertools.combinations
- itertools.combinations_with_replacement
- itertools.permutations
- itertools.product
- itertools.zip_longest
- zip
Previously, they could have become untracked by a prior garbage collection.
(cherry picked from commit 226a012d1cd61f42ecd3056c554922f359a1a35d)
|
| | |
|
| |
|
|
|
|
|
|
|
| |
(GH-13464)
Automatically replace
tp_print -> tp_vectorcall_offset
tp_compare -> tp_as_async
tp_reserved -> tp_as_async
|
| | |
|
| |
|
| |
Co-authored-by: Mark Shannon <mark@hotpy.org>
|
| |
|
|
| |
(GH-12881)
|
| | |
|
| |
|
|
| |
(GH-11715)
|
| | |
|
| |
|
|
|
|
| |
Fix invalid function cast warnings with gcc 8
for method conventions different from METH_NOARGS, METH_O and
METH_VARARGS excluding Argument Clinic generated code.
|
| |
|
|
| |
Move _PyTuple_ITEMS() to a new header file:
Include/internal/pycore_tupleobject.h
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename Include/internal/ headers:
* pycore_hash.h -> pycore_pyhash.h
* pycore_lifecycle.h -> pycore_pylifecycle.h
* pycore_mem.h -> pycore_pymem.h
* pycore_state.h -> pycore_pystate.h
Add missing headers to Makefile.pre.in and PCbuild:
* pycore_condvar.h.
* pycore_hamt.h
* pycore_pyhash.h
|
| |
|
|
|
|
|
| |
* _PyTuple_ITEMS() gives access to the tuple->ob_item field and cast the
first argument to PyTupleObject*. This internal macro is only usable if
Py_BUILD_CORE is defined.
* Replace &PyTuple_GET_ITEM(ob, 0) with _PyTuple_ITEMS(ob).
* Replace PyTuple_GET_ITEM(op, 1) with &_PyTuple_ITEMS(ob)[1].
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Rename Include/internal/ header files:
* pyatomic.h -> pycore_atomic.h
* ceval.h -> pycore_ceval.h
* condvar.h -> pycore_condvar.h
* context.h -> pycore_context.h
* pygetopt.h -> pycore_getopt.h
* gil.h -> pycore_gil.h
* hamt.h -> pycore_hamt.h
* hash.h -> pycore_hash.h
* mem.h -> pycore_mem.h
* pystate.h -> pycore_state.h
* warnings.h -> pycore_warnings.h
* PCbuild project, Makefile.pre.in, Modules/Setup: add the
Include/internal/ directory to the search paths of header files.
* Update includes. For example, replace #include "internal/mem.h"
with #include "pycore_mem.h".
|
| | |
|
| |
|
|
| |
This function returns the last component of tp_name after a dot.
Returns tp_name itself if it doesn't contain a dot.
|
| |
|
|
|
|
|
| |
* group the (stateful) runtime globals into various topical structs
* consolidate the topical structs under a single top-level _PyRuntimeState struct
* add a check-c-globals.py script that helps identify runtime globals
Other globals are excluded (see globals.txt and check-c-globals.py).
|
| | |
|
| | |
|
| |
|
|
| |
Fast paths in partial.__new__ no longer needed since concatenating with empty
tuple was optimized.
|
| |
|
|
| |
are not strings (#649)
|
| |
|
|
|
|
|
|
| |
* Add _PyObject_HasFastCall()
* partial_call() now avoids temporary tuple to pass positional
arguments if the callable supports the FASTCALL calling convention
for positional arguments.
* Fix also a performance regression in partial_call() if the callable
doesn't support FASTCALL.
|
| |
|
|
| |
Add a comment to prevent further attempts to avoid a copy for
optimization.
|
| |
|
| |
no longer affects a partial object after creation.
|
| |\
| |
| |
| |
| | |
KeyError could be raised when cached function with full cache was
simultaneously called from differen threads with the same uncached arguments.
|
| | |\
| | |
| | |
| | |
| | | |
KeyError could be raised when cached function with full cache was
simultaneously called from differen threads with the same uncached arguments.
|
| | | |
| | |
| | |
| | |
| | | |
KeyError could be raised when cached function with full cache was
simultaneously called from differen threads with the same uncached arguments.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
dict.
|
| |/ /
| |
| |
| |
| |
| |
| | |
Replace:
PyObject_CallObject(callable, NULL)
with:
_PyObject_CallNoArg(callable)
|
| |\ \
| |/ |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
The pure Python fallback implementation of functools.partial
now matches the behaviour of its accelerated C counterpart for
subclassing, pickling and text representation purposes.
Patch by Emanuel Barry and Serhiy Storchaka.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Issue #27809:
* Rename _PyObject_FastCall() function to _PyObject_FastCallDict()
* Add _PyObject_FastCall(), _PyObject_CallNoArg() and _PyObject_CallArg1()
macros calling _PyObject_FastCallDict()
|
| |/
|
|
|
| |
Issue #27128: keyobject_richcompare() now calls _PyObject_FastCall() using a
small stack allocated on the C stack to avoid a temporary tuple.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Fixed a crash when unpickle the functools.partial object with wrong state.
Fixed a leak in failed functools.partial constructor.
"args" and "keywords" attributes of functools.partial have now always types
tuple and dict correspondingly.
|
| |
|
|
|
| |
independedly from the type of the wrapped object (by returning the original
object unchanged).
|
| |
|
|
| |
(by returning the original object unchanged).
|
| |
|
|
| |
hash only once.
|
| |
|
|
| |
constructing lru_cache (C implementation).
|
| |
|
|
| |
methods.
|
| | |
|
| | |
|