Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | bpo-18533: Avoid RecursionError from repr() of recursive dictview (GH-4823) | Miss Islington (bot) | 2018-02-26 | 1 | -4/+12 |
| | | | | | | | | | | | | | | | | | | dictview_repr(): Use a Py_ReprEnter() / Py_ReprLeave() pair to check for recursion, and produce "..." if so. test_recursive_repr(): Check for the string rather than a RecursionError. (Test cannot be any tighter as contents are implementation-dependent.) test_deeply_nested_repr(): Add new test, replacing the original test_recursive_repr(). It checks that a RecursionError is raised in the case of a non-recursive but deeply nested structure. (Very similar to what test_repr_deep() in test/test_dict.py does for a normal dict.) OrderedDictTests: Add new test case, to test behavior on OrderedDict instances containing their own values() or items(). (cherry picked from commit d7773d92bd11640a8c950d6c36a9cef1cee36f96) | ||||
* | bpo-31095: fix potential crash during GC (GH-3195) | INADA Naoki | 2017-09-04 | 1 | -0/+6 |
| | | | (cherry picked from commit a6296d34a478b4f697ea9db798146195075d496c) | ||||
* | [3.6] bpo-27945: Fixed various segfaults with dict. (GH-1657) (#1677) | Serhiy Storchaka | 2017-05-20 | 1 | -25/+44 |
| | | | | Based on patches by Duane Griffin and Tim Mitchell. (cherry picked from commit 753bca3934a7618a4fa96e107ad1c5c18633a683) | ||||
* | bpo-29941: Assert fixes (#886) (#955) | T. Wouters | 2017-04-02 | 1 | -1/+1 |
| | | | | | | | | | | Make a non-Py_DEBUG, asserts-enabled build of CPython possible. This means making sure helper functions are defined when NDEBUG is not defined, not just when Py_DEBUG is defined. Also fix a division-by-zero in obmalloc.c that went unnoticed because in Py_DEBUG mode, elsize is never zero. (cherry picked from commit a00c3fd12d421e41b769debd7df717d17b0deed5 and 06bb4873d6a9ac303701d08a851d6cd9a51e02a3) | ||||
* | bpo-29864: Don't use Py_SIZE for dict object. (#747) (#750) | Serhiy Storchaka | 2017-03-22 | 1 | -1/+1 |
| | |||||
* | bpo-24274: fix erroneous comment in dictobject.c (GH-200) | INADA Naoki | 2017-02-20 | 1 | -1/+2 |
| | | | | lookdict_unicode() and lookdict_unicode_nodummy() may raise exception when key is not unicode. | ||||
* | bpo-29438: fixed use-after-free in key sharing dict (#39) | INADA Naoki | 2017-02-13 | 1 | -3/+7 |
| | |||||
* | Issue #28969: Fixed race condition in C implementation of functools.lru_cache. | Serhiy Storchaka | 2017-01-12 | 1 | -8/+23 |
|\ | | | | | | | | | KeyError could be raised when cached function with full cache was simultaneously called from differen threads with the same uncached arguments. | ||||
| * | Issue #28969: Fixed race condition in C implementation of functools.lru_cache. | Serhiy Storchaka | 2017-01-12 | 1 | -8/+23 |
| | | | | | | | | | | KeyError could be raised when cached function with full cache was simultaneously called from differen threads with the same uncached arguments. | ||||
* | | Issue #28427: old keys should not remove new values from | Antoine Pitrou | 2016-12-27 | 1 | -17/+74 |
|\ \ | |/ | | | | | WeakValueDictionary when collecting from another thread. | ||||
| * | Issue #28427: old keys should not remove new values from | Antoine Pitrou | 2016-12-27 | 1 | -25/+56 |
| | | | | | | | | WeakValueDictionary when collecting from another thread. | ||||
| * | Issue #28147: Fix a memory leak in split-table dictionaries | INADA Naoki | 2016-12-20 | 1 | -6/+15 |
| | | | | | | | | setattr() must not convert combined table into split table. | ||||
| * | Issue #28189: dictitems_contains no longer swallows compare errors. | Raymond Hettinger | 2016-09-19 | 1 | -1/+1 |
| | | | | | | | | (Patch by Xiang Zhang) | ||||
* | | Fix a memory leak in split-table dictionaries | Victor Stinner | 2016-12-15 | 1 | -5/+22 |
| | | | | | | | | | | | | | | Issue #28147: Fix a memory leak in split-table dictionaries: setattr() must not convert combined table into split table. Patch written by INADA Naoki. | ||||
* | | Issue #28731: Optimize _PyDict_NewPresized() to create correct size dict. | INADA Naoki | 2016-12-07 | 1 | -5/+19 |
| | | | | | | | | Improve speed of dict literal with constant keys up to 30%. | ||||
* | | Issue #28123: _PyDict_GetItem_KnownHash() now can raise an exception as | Serhiy Storchaka | 2016-11-06 | 1 | -26/+22 |
| | | | | | | | | PyDict_GetItemWithError(). Patch by Xiang Zhang. | ||||
* | | Issue #28583: PyDict_SetDefault didn't combine split table when needed. | INADA Naoki | 2016-11-02 | 1 | -15/+45 |
| | | | | | | | | Patch by Xiang Zhang. | ||||
* | | Backed out changeset 6b88dfc7b25d | Serhiy Storchaka | 2016-10-31 | 1 | -63/+60 |
| | | |||||
* | | Issue #28199: Microoptimized dict resizing. Based on patch by Naoki Inada. | Serhiy Storchaka | 2016-10-29 | 1 | -60/+63 |
| | | |||||
* | | Issue #28544: Pass `PyObject*` to _PyDict_Pop, not `PyDictObject*` | Yury Selivanov | 2016-10-28 | 1 | -2/+6 |
| | | |||||
* | | Issue #28509: dict.update() no longer allocate unnecessary large memory | INADA Naoki | 2016-10-27 | 1 | -2/+4 |
| | | |||||
* | | - dictobject.c: Make dict_merge symbol a static symbol | doko@ubuntu.com | 2016-10-11 | 1 | -1/+1 |
| | | |||||
* | | Issue #28183: Optimize and cleanup dict iteration. | Serhiy Storchaka | 2016-10-09 | 1 | -109/+106 |
| | | |||||
* | | Issue #28201: Dict reduces possibility of 2nd conflict in hash table. | INADA Naoki | 2016-10-06 | 1 | -16/+22 |
| | | | | | | | | Do perturb shift after first conflict. | ||||
* | | Issue #27358: Optimized merging var-keyword arguments and improved error | Serhiy Storchaka | 2016-10-02 | 1 | -9/+36 |
| | | | | | | | | message when pass a non-mapping as a var-keyword argument. | ||||
* | | issue #28144: Decrease empty_keys_struct's dk_refcnt | Serhiy Storchaka | 2016-09-26 | 1 | -1/+1 |
| | | | | | | | | | | since there is no dummy_struct any more. Patch by Xiang Zhang. | ||||
* | | Issue #28194: Clean up some checks in dict implementation. | Serhiy Storchaka | 2016-09-26 | 1 | -10/+11 |
| | | | | | | | | Patch by Xiang Zhang. | ||||
* | | merge | Raymond Hettinger | 2016-09-19 | 1 | -1/+1 |
| | | |||||
* | | Add _PyDict_CheckConsistency() | Victor Stinner | 2016-09-14 | 1 | -2/+88 |
| | | | | | | | | | | | | | | | | Issue #28127: Add a function to check that a dictionary remains consistent after any change. By default, tables are not checked, only basic attributes. Define DEBUG_PYDICT (ex: gcc -D DEBUG_PYDICT) to also check dictionary "content". | ||||
* | | Fix _PyDict_Pop() on pending key | Victor Stinner | 2016-09-13 | 1 | -1/+1 |
| | | | | | | | | | | | | | | 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: Cleanup find_empty_slot() | Victor Stinner | 2016-09-13 | 1 | -6/+2 |
| | | | | | | | | find_empty_slot() only supports combined dict | ||||
* | | Issue #28077: find_empty_slot() only supports combined dict | Victor Stinner | 2016-09-12 | 1 | -3/+7 |
| | | |||||
* | | Fixed compiler warnings in compact dict implementation on 32-bit platforms. | Serhiy Storchaka | 2016-09-10 | 1 | -11/+11 |
| | | |||||
* | | dictobject.c: explain why stringlib is used | Victor Stinner | 2016-09-10 | 1 | -1/+1 |
| | | |||||
* | | Fix SystemError in compact dict | Victor Stinner | 2016-09-10 | 1 | -19/+33 |
| | | | | | | | | | | | | | | | | | | 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. | ||||
* | | Issue #28033: Fix typo in dictobject.c | Berker Peksag | 2016-09-09 | 1 | -1/+1 |
| | | | | | | | | Patch by Wesley Emeneker. | ||||
* | | do not worry about 64-bit dict sizes on 32-bit platforms | Benjamin Peterson | 2016-09-08 | 1 | -3/+7 |
| | | |||||
* | | Add a new private version to the builtin dict type | Victor Stinner | 2016-09-08 | 1 | -0/+19 |
| | | | | | | | | | | | | | | Issue #26058: Add a new private version to the builtin dict type, incremented at each dictionary creation and at each dictionary change. Implementation of the PEP 509. | ||||
* | | access dk_indices through a union | Benjamin Peterson | 2016-09-08 | 1 | -16/+12 |
| | | |||||
* | | Add documentation to the dict implementation | Victor Stinner | 2016-09-08 | 1 | -1/+1 |
| | | | | | | | | Issue #27350. | ||||
* | | Reindeint DK_xxx macros | Victor Stinner | 2016-09-08 | 1 | -6/+11 |
| | | | | | | | | Issue #27350. | ||||
* | | dk_get_index/dk_set_index uses a type indices variable | Victor Stinner | 2016-09-08 | 1 | -8/+16 |
| | | | | | | | | Issue #27350. | ||||
* | | Split lookdict_unicode_nodummy() assertion to debug | Victor Stinner | 2016-09-08 | 1 | -1/+2 |
| | | | | | | | | Issue #27350. | ||||
* | | Add assertions to dk_set_index() | Victor Stinner | 2016-09-08 | 1 | -4/+14 |
| | | | | | | | | Issue #27350. | ||||
* | | link to canonical blogspot | Benjamin Peterson | 2016-09-08 | 1 | -1/+1 |
| | | |||||
* | | use native inline instead of Py_LOCAL_INLINE | Benjamin Peterson | 2016-09-08 | 1 | -3/+3 |
| | | |||||
* | | rearrange to make gcc happy | Benjamin Peterson | 2016-09-08 | 1 | -1/+3 |
| | | |||||
* | | Add Py_MEMBER_SIZE macro | Victor Stinner | 2016-09-08 | 1 | -8/+12 |
| | | | | | | | | | | Issue #27350: use Py_MEMBER_SIZE() macro to get the size of PyDictKeyEntry.dk_indices, rather than hardcoding 8. | ||||
* | | Implement compact dict | Victor Stinner | 2016-09-08 | 1 | -534/+715 |
| | | | | | | | | | | | | | | | | | | | | | | | | 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. | ||||
* | | remove memory indirections in dict_traverse (closes #27956) | Benjamin Peterson | 2016-09-05 | 1 | -9/+11 |
| | |