| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
The test suite fetches the C recursion limit from the _testcapi
extension module. Test extension modules can be disabled using the
--disable-test-modules configure option.
|
|
|
|
|
|
|
| |
Symbols of the C API should be prefixed by "Py_" to avoid conflict
with existing names in 3rd party C extensions on "#include <Python.h>".
test.pythoninfo now logs Py_C_RECURSION_LIMIT constant and other
_testcapi and _testinternalcapi constants.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move private functions to the internal C API (pycore_dict.h):
* _PyDictView_Intersect()
* _PyDictView_New()
* _PyDict_ContainsId()
* _PyDict_DelItemId()
* _PyDict_DelItem_KnownHash()
* _PyDict_GetItemIdWithError()
* _PyDict_GetItem_KnownHash()
* _PyDict_HasSplitTable()
* _PyDict_NewPresized()
* _PyDict_Next()
* _PyDict_Pop()
* _PyDict_SetItemId()
* _PyDict_SetItem_KnownHash()
* _PyDict_SizeOf()
No longer export most of these functions.
Move also the _PyDictViewObject structure to the internal C API.
Move dict_getitem_knownhash() function from _testcapi to the
_testinternalcapi extension. Update test_capi.test_dict for this
change.
|
|
|
|
|
|
| |
`_PyEval_EvalFrameDefault()` (GH-107535)
* Set C recursion limit to 1500, set cost of eval loop to 2 frames, and compiler mutliply to 2.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* Specialize STORE_SUBSCR for list[int], and dict[object]
* Adds _PyDict_SetItem_Take2 which consumes references to the key and values.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Never change types' cached keys. It could invalidate inline attribute objects.
* Lazily create object dictionaries.
* Update specialization of LOAD/STORE_ATTR.
* Don't update shared keys version for deletion of value.
* Update gdb support to handle instance values.
* Rename SPLIT_KEYS opcodes to INSTANCE_VALUE.
|
|
|
|
|
| |
Fix typos in the Lib directory as identified by codespell.
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
| |
share keys more freely. (GH-28520)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
PyObject_RichCompareBool (GH-17734)
Take strong references before calling PyObject_RichCompareBool to protect against the case
where the object dies during the call.
|
|
|
|
|
| |
dict (GH-16846)
The reverse iterator for empty dictionaries was not handling correctly shared-key dictionaries.
|
|
|
|
| |
(GH-12619)
|
| |
|
|
|
|
|
| |
test_reduce_ex() in test_array.py and
test_reversevaluesiterator_pickling() in test_dict.py weren't using
the highest pickle protocol.
|
| |
|
|
|
|
|
|
|
| |
When dict subclass overrides order (`__iter__()`, `keys()`, and `items()`), `dict(o)`
should use it instead of dict ordering.
https://bugs.python.org/issue34320
|
| |
|
| |
|
|
|
|
|
| |
instead of crashing due to a stack overflow.
This perhaps will fix similar problems in other extension types.
|
|
|
|
| |
Based on patches by Duane Griffin and Tim Mitchell.
|
|
|
|
|
|
|
| |
Issue #28147: Fix a memory leak in split-table dictionaries: setattr() must not
convert combined table into split table.
Patch written by INADA Naoki.
|
|
|
|
| |
PyDict_GetItemWithError(). Patch by Xiang Zhang.
|
|
|
|
| |
Patch by Xiang Zhang.
|
|
|
|
|
|
|
| |
Issue #28120: Fix dict.pop() for splitted dictionary when trying to remove a
"pending key" (Not yet inserted in split-table).
Patch by Xiang Zhang.
|
|
|
|
|
|
|
|
|
| |
Issue #28040: Fix _PyDict_DelItem_KnownHash() and _PyDict_Pop(): convert
splitted table to combined table to be able to delete the item.
Write an unit test for the issue.
Patch by INADA Naoki.
|
|\ |
|
| | |
|
|\ \
| |/
| |
| |
| |
| | |
Affected classes are generic sequence iterators, iterators of str, bytes,
bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding
views and os.scandir() iterator.
|
| |
| |
| |
| |
| |
| | |
Affected classes are generic sequence iterators, iterators of str, bytes,
bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding
views and os.scandir() iterator.
|
|/
|
|
|
|
| |
* Write one import per line
* Sort imports by name
* Add an empty line: 2 empty lines between code blocks at the module level (PEP 8)
|
|\ |
|
| | |
|
|\ \
| |/ |
|
| |\ |
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| | |
I have compared output between pre- and post-patch runs of these tests
to make sure there's nothing missing and nothing broken, on both
Windows and Linux. The only differences I found were actually tests
that were previously *not* run.
|
| | |
|
|/
|
|
| |
dict insertion in debug mode.
|
| |
|
|\ |
|
| |
| |
| |
| | |
#16345)
|