summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_deque.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-28395: Remove unnecessary semicolons in tests (GH-26868)Dong-hee Na2021-06-231-3/+4
|
* bpo-40521: Convert deque freelist from global vars to instance vars (GH-25906)Raymond Hettinger2021-05-051-1/+2
|
* bpo-41055: Remove outdated tests for the tp_print slot. (GH-21006)Serhiy Storchaka2020-06-211-35/+2
|
* bpo-39590: make deque.__contains__ and deque.count hold strong references ↵sweeneyde2020-02-091-0/+12
| | | | (GH-18421)
* Minor performance tweak for deque.index() with a start argument (GH-9440)Raymond Hettinger2018-09-211-0/+8
|
* closes bpo-31608: Fix a crash in methods of a subclass of _collections.deque ↵Oren Milman2018-09-111-0/+15
| | | | with a bad __new__(). (GH-3788)
* bpo-29919: Remove unused imports found by pyflakes (#137)Victor Stinner2017-03-271-1/+0
| | | Make also minor PEP8 coding style fixes on modified imports.
* Issue #27626: Merge spelling fixes from 3.5Martin Panter2016-07-281-1/+1
|\
| * Issue #27626: Spelling fixes in docs, comments and internal namesMartin Panter2016-07-281-1/+1
| | | | | | | | Based on patch by Ville Skyttä.
* | Fixed test_sizeof for deque.Serhiy Storchaka2016-05-181-2/+2
|\ \ | |/
| * Fixed test_sizeof for deque.Serhiy Storchaka2016-05-181-2/+2
| |
* | Issue #26494: Fixed crash on iterating exhausting iterators.Serhiy Storchaka2016-03-301-0/+4
|\ \ | |/ | | | | | | | | 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/+4
| | | | | | | | | | | | Affected classes are generic sequence iterators, iterators of str, bytes, bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding views and os.scandir() iterator.
* | Issue #26015: Added new tests for pickling iterators of mutable sequences.Serhiy Storchaka2016-03-061-11/+38
|\ \ | |/
| * Issue #26015: Added new tests for pickling iterators of mutable sequences.Serhiy Storchaka2016-03-061-11/+38
| |
| * Issue #26194: Inserting into a full deque to raise an IndexErrorRaymond Hettinger2016-02-021-11/+12
| |
* | Issue #26482: Allowed pickling recursive dequeues.Serhiy Storchaka2016-03-061-32/+36
| |
* | mergeRaymond Hettinger2016-02-021-11/+12
| |
* | mergeRaymond Hettinger2016-01-271-0/+14
|\ \ | |/
| * Issue #26194: Fix undefined behavior for deque.insert() when len(d) == maxlenRaymond Hettinger2016-01-271-0/+14
| |
| * Issue #24913: Fix overrun error in deque.index().Brett Cannon2015-09-031-0/+5
| | | | | | | | Reported by John Leitch and Bryce Darling, patch by Raymond Hettinger.
* | Fix typoRaymond Hettinger2016-01-261-1/+1
| |
* | Add a fast path (no iterator creation) for a common case for repeating ↵Raymond Hettinger2015-09-191-0/+9
| | | | | | | | deques of size 1
* | Issue #24913: Fix overrun error in deque.index().Raymond Hettinger2015-08-261-0/+5
|/
* Check deques against common sequence tests (except for slicing).Raymond Hettinger2015-04-011-0/+16
|
* Issue 23793: Add deque support for __add__(), __mul__(), and __imul__().Raymond Hettinger2015-03-311-0/+77
|
* Issue 23704: Add index(), copy(), and insert() to deques. Register deques ↵Raymond Hettinger2015-03-211-0/+57
| | | | as a MutableSequence.
* Issue 23705: Improve the performance of __contains__ checks for deques.Raymond Hettinger2015-03-201-0/+20
|
* Bump the blocksize up from 62 to 64 to speed up the modulo calculation.Raymond Hettinger2015-02-271-1/+1
| | | | | | | | | Remove the old comment suggesting that it was desireable to have blocksize+2 as a multiple of the cache line length. That would have made sense only if the block structure start point was always aligned to a cache line boundary. However, the memory allocations are 16 byte aligned, so we don't really have control over whether the struct spills across cache line boundaries.
* Issue #22777: Test pickling with all protocols.Serhiy Storchaka2014-12-151-20/+23
|\
| * Issue #22777: Test pickling with all protocols.Serhiy Storchaka2014-12-151-20/+23
| |
* | Issue 19898: Add test for dequereviter_new.Raymond Hettinger2014-06-151-0/+5
|/ | | | (Patch contributed by Claudiu Popa.)
* Restore the data block size to 62.Raymond Hettinger2013-07-281-1/+1
| | | | | | | | | | | | The former block size traded away good fit within cache lines in order to gain faster division in deque_item(). However, compilers are getting smarter and can now replace the slow division operation with a fast integer multiply and right shift. Accordingly, it makes sense to go back to a size that lets blocks neatly fill entire cache-lines. GCC-4.8 and CLANG 4.0 both compute "x // 62" with something roughly equivalent to "x * 9520900167075897609 >> 69".
* Add a spacing saving heuristic to deque's extend methodsRaymond Hettinger2013-07-091-2/+2
|
* Speed-up deque indexing by changing the deque block length to a power of two.Raymond Hettinger2013-07-061-1/+1
| | | | | | | | | | | | | | | The division and modulo calculation in deque_item() can be compiled to fast bitwise operations when the BLOCKLEN is a power of two. Timing before: ~/cpython $ py -m timeit -r7 -s 'from collections import deque' -s 'd=deque(range(10))' 'd[5]' 10000000 loops, best of 7: 0.0627 usec per loop Timing after: ~/cpython $ py -m timeit -r7 -s 'from collections import deque' -s 'd=deque(range(10))' 'd[5]' 10000000 loops, best of 7: 0.0581 usec per loop
* MERGE: Closes #15469: Correct __sizeof__ support for dequeJesus Cea2012-08-031-0/+16
|\
| * Closes #15469: Correct __sizeof__ support for dequeJesus Cea2012-08-031-0/+16
| |
* | Issue #14288: Serialization support for builtin iterators.Kristján Valur Jónsson2012-04-031-0/+13
|/
* Issue #11004: Repair edge case in deque.count().Raymond Hettinger2011-01-251-0/+9
| | | | | | | | | (Reviewed by Georg Brandl.) Also made similar changes to deque.reverse() though this wasn't strictly necessary (the edge case cannot occur with two pointers moving to meet in the middle). Making the change in reverse() was more a matter of future-proofing.
* #9424: Replace deprecated assert* methods in the Python test suite.Ezio Melotti2010-11-201-1/+1
|
* Add count() method to collections.deque().Raymond Hettinger2010-04-031-0/+24
|
* Merged revisions 78093 via svnmerge fromGeorg Brandl2010-03-141-1/+0
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78093 | georg.brandl | 2010-02-07 18:03:15 +0100 (So, 07 Feb 2010) | 1 line Remove unused imports in test modules. ........
* use assert[Not]In where appropriateBenjamin Peterson2010-01-191-3/+3
| | | | A patch from Dave Malcolm.
* Fix variants of deque.extend: d.extend(d) d+=d d.extendleft(d)Raymond Hettinger2009-12-101-0/+11
|
* Add a reverse() method to collections.deque().Raymond Hettinger2009-12-101-0/+12
|
* convert old fail* assertions to assert*Benjamin Peterson2009-06-301-5/+5
|
* For collections.deque() objects, expose the maxlen parameter as a read-only ↵Raymond Hettinger2009-03-101-0/+10
| | | | attribute.
* Small optimization for corner case where maxlen==0.Raymond Hettinger2009-03-101-1/+18
|
* Issue #1717: Remove cmp. Stage 1: remove all uses of cmp and __cmp__ fromMark Dickinson2009-01-271-1/+0
| | | | the standard library and tests.
* Merged revisions 68128 via svnmerge fromAntoine Pitrou2009-01-011-2/+19
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r68128 | antoine.pitrou | 2009-01-01 15:11:22 +0100 (jeu., 01 janv. 2009) | 3 lines Issue #3680: Reference cycles created through a dict, set or deque iterator did not get collected. ........