summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_dict.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-40116: Add insertion order bit-vector to dict values to allow dicts to ↵Mark Shannon2021-10-061-36/+1
| | | | share keys more freely. (GH-28520)
* bpo-24275: Don't downgrade unicode-only dicts to mixed on lookups (GH-25186)Hristo Venev2021-04-291-0/+100
|
* bpo-42536: GC track recycled tuples (GH-23623)Brandt Bucher2020-12-051-0/+19
| | | | | | | | | | | | | | | | 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.
* bpo-40890: Add `mapping` property to dict views (GH-20749)Dennis Sweeney2020-06-121-0/+20
|
* bpo-40889: Optimize dict.items() ^ dict.items() (GH-20718)Dennis Sweeney2020-06-101-0/+10
|
* bpo-40489: Add test case for dict contain use after free (GH-19906)Dong-hee Na2020-05-041-0/+13
|
* bpo-36144: Dictionary Union (PEP 584) (#12088)Brandt Bucher2020-02-251-0/+32
|
* bpo-38588: Fix possible crashes in dict and list when calling ↵Dong-hee Na2019-12-311-1/+11
| | | | | | PyObject_RichCompareBool (GH-17734) Take strong references before calling PyObject_RichCompareBool to protect against the case where the object dies during the call.
* bpo-38525: Fix a segmentation fault when using reverse iterators of empty ↵Dong-hee Na2019-10-191-0/+25
| | | | | dict (GH-16846) The reverse iterator for empty dictionaries was not handling correctly shared-key dictionaries.
* bpo-36473: add maximum iteration check for dict .values() and .items() ↵Thomas Perl2019-04-021-1/+19
| | | | (GH-12619)
* bpo-36452: dictiter: track maximum iteration count (GH-12596)Thomas Perl2019-03-281-0/+9
|
* Include the highest pickle protocol in a couple of tests. (GH-10735)Zackery Spytz2018-11-271-1/+1
| | | | | test_reduce_ex() in test_array.py and test_reversevaluesiterator_pickling() in test_dict.py weren't using the highest pickle protocol.
* bpo-33462: Add __reversed__ to dict and dict views (GH-6827)Rémi Lapeyre2018-11-061-3/+66
|
* bpo-34320: Fix dict(o) didn't copy order of dict subclass (GH-8624)INADA Naoki2018-09-261-0/+30
| | | | | | | When dict subclass overrides order (`__iter__()`, `keys()`, and `items()`), `dict(o)` should use it instead of dict ordering. https://bugs.python.org/issue34320
* Test dict values iterator pickling with pickle.HIGHEST_PROTOCOL. (GH-9052)Sergey Fedoseev2018-09-101-1/+1
|
* bpo-31179: Make dict.copy() up to 5.5 times faster. (#3067)Yury Selivanov2018-01-221-2/+48
|
* bpo-32137: The repr of deeply nested dict now raises a RecursionError (#4570)Serhiy Storchaka2017-12-031-0/+6
| | | | | instead of crashing due to a stack overflow. This perhaps will fix similar problems in other extension types.
* bpo-27945: Fixed various segfaults with dict. (#1657)Serhiy Storchaka2017-05-201-0/+85
| | | | Based on patches by Duane Griffin and Tim Mitchell.
* Fix a memory leak in split-table dictionariesVictor Stinner2016-12-151-0/+30
| | | | | | | 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 #28123: _PyDict_GetItem_KnownHash() now can raise an exception asSerhiy Storchaka2016-11-061-0/+31
| | | | PyDict_GetItemWithError(). Patch by Xiang Zhang.
* Issue #28583: PyDict_SetDefault didn't combine split table when needed.INADA Naoki2016-11-021-0/+17
| | | | Patch by Xiang Zhang.
* Fix _PyDict_Pop() on pending keyVictor Stinner2016-09-131-0/+9
| | | | | | | 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.
* Fix SystemError in compact dictVictor Stinner2016-09-101-0/+69
| | | | | | | | | 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 #27125: Merge typo fixes from 3.5Martin Panter2016-05-301-1/+1
|\
| * Issue #27125: Remove duplicated words from documentation and commentsMartin Panter2016-05-301-1/+1
| |
* | Issue #26494: Fixed crash on iterating exhausting iterators.Serhiy Storchaka2016-03-301-0/+6
|\ \ | |/ | | | | | | | | Affected classes are generic sequence iterators, iterators of str, bytes, bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding views and os.scandir() iterator.
| * Issue #26494: Fixed crash on iterating exhausting iterators.Serhiy Storchaka2016-03-301-0/+6
| | | | | | | | | | | | Affected classes are generic sequence iterators, iterators of str, bytes, bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding views and os.scandir() iterator.
* | Cleanup test_dictVictor Stinner2016-01-231-5/+8
|/ | | | | | * 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)
* Issue #25523: Merge a-to-an corrections from 3.4.Serhiy Storchaka2015-11-021-1/+1
|\
| * Issue #25523: Further a-to-an corrections.Serhiy Storchaka2015-11-021-1/+1
| |
* | merge 3.4 (#24407)Benjamin Peterson2015-07-051-0/+14
|\ \ | |/
| * merge 3.3 (#24407)Benjamin Peterson2015-07-051-0/+14
| |\
| | * protect against mutation of the dict during insertion (closes #24407)Benjamin Peterson2015-07-051-0/+15
| | |
* | | Issue #21741: Update 147 test modules to use test discovery.Zachary Ware2015-04-131-8/+1
|/ / | | | | | | | | | | | | 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.
* | Issue #22777: Test pickling with all protocols.Serhiy Storchaka2014-12-151-47/+50
| |
* | Issue #22653: Fix an assertion failure in debug mode when doing a reentrant ↵Antoine Pitrou2014-10-171-0/+29
|/ | | | dict insertion in debug mode.
* #19166: use an unused var in a test. Patch by Vajrasky Kok.Ezio Melotti2013-10-051-0/+3
|
* merge 3.2 (#16345)Benjamin Peterson2012-10-311-0/+8
|\
| * only fast-path fromkeys() when the constructor returns a empty dict (closes ↵Benjamin Peterson2012-10-311-0/+8
| | | | | | | | #16345)
* | Issue #14417: Mutating a dict during lookup now restarts the lookup instead ↵Antoine Pitrou2012-05-131-4/+3
| | | | | | | | of raising a RuntimeError (undoes issue #14205).
* | distiguish between refusing to creating shared keys and error (#13903)Benjamin Peterson2012-04-241-0/+7
| |
* | fix instance dicts with str subclasses (#13903)Benjamin Peterson2012-04-231-0/+10
| |
* | Implement PEP 412: Key-sharing dictionaries (closes #13903)Benjamin Peterson2012-04-231-0/+21
| | | | | | | | Patch from Mark Shannon.
* | Issue #14288: Serialization support for builtin iterators.Kristján Valur Jónsson2012-04-031-0/+54
| |
* | Issue #14205: Fix test_dict.test_mutating_lookup()Victor Stinner2012-03-091-9/+16
| |
* | Close #14205: dict lookup raises a RuntimeError if the dict is modified duringVictor Stinner2012-03-061-1/+21
|/ | | | | | | a lookup. "if you want to make a sandbox on top of CPython, you have to fix segfaults" so let's fix segfaults!
* Issue #13521: dict.setdefault() now does only one lookup for the given key, ↵Antoine Pitrou2012-02-261-0/+20
| | | | | | making it "atomic" for many purposes. Patch by Filip Gruszczyński.
* handle dict subclasses gracefully in PyArg_ValidateKeywordArgumentsBenjamin Peterson2010-11-171-4/+7
|
* Reverted inadvertent change from r86095Alexander Belopolsky2010-11-011-8/+0
|
* Issue #10199: Moved Demo/turtle under Lib/Alexander Belopolsky2010-11-011-0/+8
|