summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_dict.py
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Merged revisions 81465-81466,81468,81679,81735,81760,81868,82183 via ↵Benjamin Peterson2010-06-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81465 | georg.brandl | 2010-05-22 06:29:19 -0500 (Sat, 22 May 2010) | 2 lines Issue #3924: Ignore cookies with invalid "version" field in cookielib. ........ r81466 | georg.brandl | 2010-05-22 06:31:16 -0500 (Sat, 22 May 2010) | 1 line Underscore the name of an internal utility function. ........ r81468 | georg.brandl | 2010-05-22 06:43:25 -0500 (Sat, 22 May 2010) | 1 line #8635: document enumerate() start parameter in docstring. ........ r81679 | benjamin.peterson | 2010-06-03 16:21:03 -0500 (Thu, 03 Jun 2010) | 1 line use a set for membership testing ........ r81735 | michael.foord | 2010-06-05 06:46:59 -0500 (Sat, 05 Jun 2010) | 1 line Extract error message truncating into a method (unittest.TestCase._truncateMessage). ........ r81760 | michael.foord | 2010-06-05 14:38:42 -0500 (Sat, 05 Jun 2010) | 1 line Issue 8302. SkipTest exception is setUpClass or setUpModule is now reported as a skip rather than an error. ........ r81868 | benjamin.peterson | 2010-06-09 14:45:04 -0500 (Wed, 09 Jun 2010) | 1 line fix code formatting ........ r82183 | benjamin.peterson | 2010-06-23 15:29:26 -0500 (Wed, 23 Jun 2010) | 1 line cpython only gc tests ........
* prevent the dict constructor from accepting non-string keyword args #8419Benjamin Peterson2010-04-241-0/+6
| | | | | This adds PyArg_ValidateKeywordArguments, which checks that keyword arguments are all strings, using an optimized method if possible.
* Recorded merge of revisions 78582 via svnmerge fromFlorent Xicluna2010-03-021-92/+79
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78582 | florent.xicluna | 2010-03-02 17:00:00 +0100 (mar, 02 mar 2010) | 2 lines Refactor test_dict using assertRaises. ........
* Merged revisions 77727 via svnmerge fromEzio Melotti2010-01-241-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77727 | ezio.melotti | 2010-01-24 18:58:36 +0200 (Sun, 24 Jan 2010) | 1 line use assert[Not]IsInstance where appropriate ........
* use assert[Not]In where appropriateEzio Melotti2010-01-231-8/+1
|
* use assert[Not]In where appropriateBenjamin Peterson2010-01-191-0/+8
| | | | A patch from Dave Malcolm.
* Issue #7435: Remove duplicate int/long tests, and otherMark Dickinson2009-12-051-7/+0
| | | | references to long in py3k. Patch provided by flox.
* convert old fail* assertions to assert*Benjamin Peterson2009-06-301-26/+26
|