Cheryl Sabella
325191bd6b
[2.7] bpo-27212: Modify islice recipe to consume initial values preceding start (GH-6195) (GH-6339)
...
(cherry picked from commit da1734c58d
)
2018-04-01 22:29:01 -07:00
Victor Stinner
2ce1ef54d3
Fix DeprecationWarning in tests ( #4345 )
...
Define __hash__() in test_functools and test_itertools to fix the
following warning:
DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x
2017-11-08 14:45:55 -08:00
Serhiy Storchaka
d0b9dc3367
[2.7] bpo-30347: Stop crashes when concurrently iterate over itertools.groupby() iterators. (GH-1557). ( #3772 )
...
(cherry picked from commit c740e4fe8a
)
2017-09-26 23:15:36 +03:00
T. Wouters
d694a06206
bpo-29942: Fix the use of recursion in itertools.chain.from_iterable. ( #913 )
...
Fix the use of recursion in itertools.chain.from_iterable. Using recursion
is unnecessary, and can easily cause stack overflows, especially when
building in low optimization modes or with Py_DEBUG enabled.
(cherry picked from commit 5466d4af5f
)
2017-03-30 12:49:22 -07:00
Serhiy Storchaka
7f8ce85947
Issue #28019 : Backported additional tests for itertools.count().
2016-09-10 09:53:29 +03:00
Raymond Hettinger
2ec5fd546f
Document another recipe for itertools: all_equal(). Inspired by David Beazley.
2016-03-06 18:06:29 -08:00
Serhiy Storchaka
53ea162067
Make some tests more frienly to MemoryError.
...
Free memory, unlock hanging threads.
2015-03-28 20:38:48 +02:00
Serhiy Storchaka
42aa9c078a
Issues #23363 , #23364 , #23365 , #23366 : Fixed itertools overflow tests.
...
Used PyMem_New to check overflow.
2015-02-03 01:34:09 +02:00
Benjamin Peterson
dda9121ad1
check for overflows in permutations() and product() ( closes #23363 , closes #23364 )
2015-02-01 21:34:07 -05:00
Benjamin Peterson
17845c1786
check for overflow in combinations_with_replacement ( closes #23365 )
2015-02-01 21:10:47 -05:00
Benjamin Peterson
021dec1c96
detect overflow in combinations ( closes #23366 )
2015-02-01 20:59:00 -05:00
Serhiy Storchaka
655720e275
Issue #22777 : Test pickling with all protocols.
2014-12-15 14:02:43 +02:00
Benjamin Peterson
ec9d547edd
allow test to work on implementations not using ref-counting ( closes #22265 )
2014-08-24 18:07:28 -05:00
Raymond Hettinger
58ad24512a
Issue #19145 : Fix handling of negative values for a "times" keyword argument to itertools.repeat()>
...
(Patch contributed by Vajrasky Kok.)
2014-06-24 21:53:45 -07:00
Antoine Pitrou
3ec903fce4
Issue #21321 : itertools.islice() now releases the reference to the source iterator when the slice is exhausted.
...
Patch by Anton Afanasyev.
2014-04-29 12:13:46 +02:00
Zachary Ware
4e0df17bd7
Issue #21346 : Fix typos in test_itertools. Patch by Brian Kearns.
2014-04-24 13:20:27 -05:00
Serhiy Storchaka
6c467a41bc
Revert a premature patch for issue #14010 (changeset d17d10c84d27).
2013-04-06 22:51:29 +03:00
Serhiy Storchaka
bb84565cdb
Issue #14010 : Fix a crash when iterating or deleting deeply nested filters
...
in itertools module (i.e. itertools.izip(), itertools.chain(), etc).
2013-04-06 22:04:10 +03:00
Serhiy Storchaka
6fef14d7f3
Optimize the test for issue #13454 .
...
Now it requires almost 4x less memory and is almost 2x faster.
2013-01-26 11:51:42 +02:00
Serhiy Storchaka
b09ec9b618
Issue #13454 : Fix a crash when deleting an iterator created by itertools.tee()
...
if all other iterators were very advanced before.
2013-01-25 13:31:05 +02:00
Alex Gaynor
9737648c74
Backport 2eb8789e30e7.
2011-07-17 16:44:31 -07:00
Ezio Melotti
c2077b0d9b
#11565 : Fix several typos. Patch by Piotr Kasprzyk.
2011-03-16 12:34:31 +02:00
Raymond Hettinger
061bf7a11a
Issue #10323 : Predictable final state for slice().
2010-11-30 03:15:35 +00:00
Ezio Melotti
2623a37852
Merged revisions 86596 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line
#9424 : Replace deprecated assert* methods in the Python test suite.
........
2010-11-21 13:34:58 +00:00
Ezio Melotti
dde5b94875
#7092 : Silence more py3k warnings. Patch by Florent Xicluna.
2010-02-03 05:37:26 +00:00
Ezio Melotti
aa98058cc4
use assert[Not]In where appropriate
2010-01-23 23:04:36 +00:00
Senthil Kumaran
ce8e33a095
Reverting the Revision: 77368. I committed Flox's big patch for tests by
...
mistake. ( It may come in for sure tough)
2010-01-08 19:04:16 +00:00
Senthil Kumaran
3ddc435af6
Fixing - Issue7026 - RuntimeError: dictionary changed size during iteration. Patch by flox
2010-01-08 18:41:40 +00:00
Raymond Hettinger
e09f45a2e3
Issue 7410: deepcopy of itertools.count resets the count
2009-11-30 19:44:40 +00:00
Raymond Hettinger
fa7dadd339
Fix exception handling in itertools.izip_longest().
2009-11-01 20:45:16 +00:00
Benjamin Peterson
5c8da86f3a
convert usage of fail* to assert*
2009-06-30 22:57:08 +00:00
Raymond Hettinger
aa681c7b99
Fix keyword arguments for itertools.count().
...
Step arg without a start arg was ignored.
2009-02-21 07:17:22 +00:00
Raymond Hettinger
f9bce83e71
Add some cross-references to the docs. Simplify the python code equivalent for izip(). Supply an optional argument for the nth() recipe.
2009-02-19 05:34:35 +00:00
Raymond Hettinger
182edaefb5
Add keyword arg support to itertools.repeat().
2009-02-19 02:38:25 +00:00
Raymond Hettinger
2e2909f584
Add keyword arg support to itertools.compress().
2009-02-19 02:15:14 +00:00
Raymond Hettinger
b21d8109af
Add GC support to count() objects. Backport candidate.
2009-02-16 20:39:12 +00:00
Raymond Hettinger
a4038038c6
Add keyword argument support to itertools.count().
2009-02-14 00:25:51 +00:00
Raymond Hettinger
dbe3bfbb30
One more test.
2009-02-12 12:43:01 +00:00
Raymond Hettinger
aa04461260
Add an extra testcase.
2009-02-12 12:04:26 +00:00
Raymond Hettinger
31c769ca89
Issue 5032: added a step argument to itertools.count() and allowed non-integer arguments.
2009-02-12 05:39:46 +00:00
Raymond Hettinger
d507afdc81
Minor doc fixups.
2009-02-04 10:52:32 +00:00
Raymond Hettinger
560f9a8a90
Add more tests for the powerset() recipe.
2009-01-27 13:26:35 +00:00
Raymond Hettinger
2f6c2e03a8
More exhaustive combinatoric checks.
2009-01-27 10:36:14 +00:00
Raymond Hettinger
f93f3032c6
Stronger tests for combinatoric relationships.
2009-01-27 09:52:35 +00:00
Raymond Hettinger
2976aaa396
Add tests to verify combinatoric relationships.
2009-01-27 09:33:06 +00:00
Raymond Hettinger
d081abc8be
Promote combinations_with_replacement() from a recipe to a regular itertool.
2009-01-27 02:58:49 +00:00
Raymond Hettinger
68d919e4d6
Improved itertools recipe for generating powerset().
2009-01-25 21:31:47 +00:00
Raymond Hettinger
2bcb8e9b0d
Promote compress() from a recipe to being a regular itertool.
2009-01-25 21:04:14 +00:00
Raymond Hettinger
5b913e31a1
Forward port r68394 for issue 4816.
2009-01-08 06:39:04 +00:00
Raymond Hettinger
44e1581df3
Issue #4615 . Document how to use itertools for de-duping.
2009-01-02 21:26:45 +00:00