Eric Snow
4fabf02633
Issue #24369 : Defend against key-changes during iteration.
2015-06-04 00:09:56 -06:00
Eric Snow
ac02ef373f
Issue #24368 : Support keyword arguments in OrderedDict methods.
2015-06-02 20:42:14 -06:00
Eric Snow
b952ab43f2
Issue #24359 : Check for changed OrderedDict size during iteration.
2015-06-01 23:35:13 -06:00
Eric Snow
d171975609
Issue #24348 : Drop superfluous increfs/decrefs.
2015-06-01 23:12:13 -06:00
Eric Snow
a762af74b2
Issue #24347 : Set KeyError if PyDict_GetItemWithError returns NULL.
2015-06-01 22:59:08 -06:00
Eric Snow
67fb92e8c6
Issue #16991 : Do not return None from OrderedDict.__reversed__.
2015-05-30 11:43:36 -06:00
Yury Selivanov
7aa5341164
Reverting my previous commit.
...
Something went horribly wrong when I was doing `hg rebase`.
2015-05-30 10:57:56 -04:00
Eric Snow
47db71756d
Issue #16991 : Add a C implementation of collections.OrderedDict.
2015-05-29 22:21:39 -06:00
Yury Selivanov
a24fcfdf23
Issue 24315: Make collections.abc.Coroutine derived from Awaitable
...
(Merge 3.5)
2015-05-29 09:01:47 -04:00
Yury Selivanov
56fc614025
Issue 24315: Make collections.abc.Coroutine derived from Awaitable
2015-05-29 09:01:29 -04:00
Raymond Hettinger
c074e9d765
Issue #24286 : Forward port dict view abstract base class tests.
2015-05-26 01:47:58 -07:00
Raymond Hettinger
ec219ba1c0
Issue #23086 : Add start and stop arguments to the Sequence.index() mixin method.
2015-05-22 19:29:22 -07:00
Raymond Hettinger
573b44c18f
Issue 22189: Add missing methods to UserString
2015-05-22 16:56:32 -07:00
Yury Selivanov
e0104ae103
Issue 24184: Add AsyncIterator and AsyncIterable to collections.abc.
2015-05-14 12:19:16 -04:00
Yury Selivanov
08e5300afc
collections.abc.tests: Remove some unnecessary code.
2015-05-13 23:57:59 -04:00
Yury Selivanov
aded55c6e3
collections.abc: Test that if an object is a Coroutine it is also an Awaitable
2015-05-13 23:41:55 -04:00
Raymond Hettinger
eac503aeac
Issue #24064 : Property() docstrings are now writeable.
...
(Patch by Berker Peksag.)
2015-05-13 01:09:59 -07:00
Yury Selivanov
7544508f02
PEP 0492 -- Coroutines with async and await syntax. Issue #24017 .
2015-05-11 22:57:16 -04:00
Raymond Hettinger
bd60e8dece
Issue #24018 : Add a collections.Generator abstract base class.
2015-05-09 01:07:23 -04:00
Raymond Hettinger
32ea16577d
Issue 23704: Add index(), copy(), and insert() to deques. Register deques as a MutableSequence.
2015-03-21 01:37:37 -07:00
Serhiy Storchaka
65ee4674e2
Issue #22777 : Test pickling with all protocols.
2014-12-15 14:06:02 +02:00
Serhiy Storchaka
bad1257c96
Issue #22777 : Test pickling with all protocols.
2014-12-15 14:03:42 +02:00
Serhiy Storchaka
a86700ae87
Issue #22609 : Revert changes in UserDict. They conflicted with existing tests.
2014-11-27 17:45:44 +02:00
Serhiy Storchaka
ae5cb214d2
Issue #22609 : Constructors and update methods of mapping classes in the
...
collections module now accept the self keyword argument.
2014-11-27 16:25:51 +02:00
Serhiy Storchaka
f51f713f30
Issue #22609 : Revert changes in UserDict. They conflicted with existing tests.
2014-11-27 17:46:15 +02:00
Serhiy Storchaka
8943ecfab2
Issue #22609 : Constructors and update methods of mapping classes in the
...
collections module now accept the self keyword argument.
2014-11-27 16:35:26 +02:00
Raymond Hettinger
bb6c0aaebf
PEP 479: Use the return-keyword instead of raising StopIteration inside a generators.
2014-11-22 22:14:41 -08:00
Raymond Hettinger
aa92d342f1
merge
2014-05-26 00:14:14 -07:00
Raymond Hettinger
dd5e53a086
Issue 8743: Improve interoperability between sets and the collections.Set abstract base class.
2014-05-26 00:09:04 -07:00
Raymond Hettinger
2d452ee166
Issue 15246: Improve test coverage for collections.abc.Set. (Contributed by James King).
2014-05-25 18:28:39 -07:00
Raymond Hettinger
53d2c41f77
Issue #19414 : Have the OrderedDict mark deleted links as unusable.
...
This gives an earlier and more visible failure if a link is deleted
during iteration.
2014-05-03 21:58:45 -07:00
Serhiy Storchaka
578c9211d6
Issue #19505 : The items, keys, and values views of OrderedDict now support
...
reverse iteration using reversed().
2014-04-04 15:19:36 +03:00
Eric V. Smith
4d5d69d452
TestNamedTuple.test_pickle was only testing through protocol 2. Changed to have it automatically test through the most recent version.
2014-02-05 10:33:14 -05:00
Raymond Hettinger
facd0a346f
Strengthen one of the collections.Counter() tests
2013-10-05 17:14:51 -07:00
Raymond Hettinger
07573d7b24
merge
2013-10-04 16:52:39 -07:00
Raymond Hettinger
cb1d96f782
Issue #18594 : Make the C code more closely match the pure python code.
2013-10-04 16:51:02 -07:00
Nick Coghlan
45163ccce4
Close #18690 : register memoryview with Sequence ABC
2013-10-02 22:31:47 +10:00
Ezio Melotti
0cb2aafb36
#18106 : refactor tests to use subtests and proper assert methods. Patch by Vajrasky Kok.
2013-07-07 13:37:20 +02:00
Serhiy Storchaka
3ee6dabf5b
Issue #17900 : Allowed pickling of recursive OrderedDicts. Decreased pickled
...
size and pickling time.
2013-05-21 12:47:57 +03:00
Raymond Hettinger
163e9821b4
Undo the deprecation of _asdict().
...
Backed out changeset c4ca39bece9d
2013-05-18 00:05:20 -07:00
Raymond Hettinger
4e0172fd9a
Deprecate nametuple._asdict()
2013-05-17 17:14:27 -07:00
Raymond Hettinger
4072875dcb
merge
2013-05-03 02:41:02 -07:00
Raymond Hettinger
b98dcc1f53
Issue #15535 : Fix pickling of named tuples.
2013-05-03 02:24:15 -07:00
Vinay Sajip
1ba81ee19a
Closes #16613 : Added optional mapping argument to ChainMap.new_child.
2013-01-11 23:39:53 +00:00
Andrew Svetlov
b904e4256e
Merge issue #16373 : Prevent infinite recursion for ABC Set class operations.
...
Patch by Serhiy Storchaka.
2012-11-01 13:31:12 +02:00
Andrew Svetlov
bcac6ad1f3
Issue #16373 : Prevent infinite recursion for ABC Set class operations.
2012-11-01 13:28:54 +02:00
Raymond Hettinger
68fb89fdb7
Fix whitespace
2011-11-05 13:43:01 -07:00
Raymond Hettinger
f1182cd4db
Merge
2011-11-05 13:39:57 -07:00
Raymond Hettinger
4e6bf41934
Improve Counter.__repr__() to not fail with unorderable values
2011-11-05 13:35:26 -07:00
Raymond Hettinger
becd56822a
Issue #13121 : Support in-place math operators for collections.Counter().
2011-10-19 13:40:37 -07:00
Raymond Hettinger
fcb393c018
Add support for unary plus and unary minus to collections.Counter()
2011-08-09 13:00:40 -07:00
Raymond Hettinger
22cc1183a3
merge
2011-06-02 23:49:44 -07:00
Raymond Hettinger
3d89057ff8
Fix named tuples to work with vars().
2011-06-02 23:40:24 -07:00
Raymond Hettinger
a5ac2ce982
Backport 3.3 fixes and cleans ups.
2011-05-02 11:02:13 -07:00
Łukasz Langa
75da860413
TestChainMap was not previously used. Minor corrections applied.
2011-04-29 11:35:03 +02:00
Raymond Hettinger
b5a40d4d3f
Fix minor subclassing issue with collections.Counter
2011-04-15 13:23:01 -07:00
Raymond Hettinger
6c9e5b779f
Fix minor subclassing issue with collections.Counter
2011-04-15 13:21:30 -07:00
Raymond Hettinger
1c746c28f3
Fix minor subclassing issue with collections.Counter
2011-04-15 13:16:46 -07:00
Raymond Hettinger
6712a3e14f
Remove test_importable(). Couldn't see how to make this reliable across all platforms.
2011-03-24 10:51:06 -07:00
Raymond Hettinger
d4652fab51
Isolate the test_source() test in test_collections
2011-03-24 09:45:43 -07:00
Raymond Hettinger
f6d3e8eaef
Add tests for _source to importable and exec'able.
...
Move __name__ back out of the template; the responsibility
for setting __name__ lies with the caller (which knows
something about the new namespace), not with the class
definition (which doesn't know about the namespace it is
being built in).
2011-03-23 20:33:30 -07:00
Raymond Hettinger
2ebea41d31
Expose the namedtuple source with a _source attribute.
2011-03-23 12:52:23 -07:00
Eli Bendersky
0716a579a4
Mentioned new clear() method of MutableSequence in its doc, and added unit tests for its mixin methods
2011-03-04 10:38:14 +00:00
Raymond Hettinger
d032131dcb
Add __bool__ method. Add tests. Fix-up broken test.
2011-02-26 06:53:58 +00:00
Raymond Hettinger
9fe1ccfb5a
Issue #11297 : Add collections.ChainMap()
2011-02-26 01:02:51 +00:00
Raymond Hettinger
dcb29c93d2
Add tests for the collections helper class and sync-up with py3k branch.
2011-02-23 08:28:06 +00:00
Raymond Hettinger
499e19340e
Add tests for the _ChainMap helper class.
2011-02-23 07:56:53 +00:00
Raymond Hettinger
57d1a887e7
Fix imports from collections.abc
2011-02-23 00:46:28 +00:00
Raymond Hettinger
1d879f6852
Backport r87613 to make OrderedDict subclassing match dict subclassing.
2011-01-04 20:57:19 +00:00
Raymond Hettinger
426e052a4f
Make C helper function more closely match the pure python version, and add tests.
2011-01-03 02:12:02 +00:00
Raymond Hettinger
345c49b16b
Fix OrderedDic.pop() to work for subclasses that define __missing__().
2011-01-01 23:51:55 +00:00
Raymond Hettinger
32062e9be7
Make it easier to extend OrderedDict without breaking it.
2011-01-01 22:38:00 +00:00
Raymond Hettinger
a673b1fd0e
Fix OrderedDict.setdefault() to work for subclasses that define __missing__().
2010-12-31 23:16:17 +00:00
Alexander Belopolsky
fdb32c15e4
Merged revisions 86857 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r86857 | raymond.hettinger | 2010-11-28 22:56:12 -0500 (Sun, 28 Nov 2010) | 1 line
Issue #10565 : Iterator ABC should require both __next__ and __iter__.
........
2010-11-30 01:01:02 +00:00
Raymond Hettinger
ead22227cc
Issue #10565 : Iterator ABC should require both __next__ and __iter__.
2010-11-29 03:56:12 +00:00
Ezio Melotti
19f2aeba67
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 01:30:29 +00:00
Ezio Melotti
b3aedd4862
#9424 : Replace deprecated assert* methods in the Python test suite.
2010-11-20 19:04:17 +00:00
Raymond Hettinger
35c87f2b8e
Issue 9865: add __sizeof__ to OrderedDict.
2010-09-16 19:10:17 +00:00
Raymond Hettinger
69976a7fbe
Issue #9826 : Handle recursive repr in collections.OrderedDict.
2010-09-12 05:28:42 +00:00
Raymond Hettinger
dc08a143e0
Issue #9826 : Handle recursive repr in collections.OrderedDict.
2010-09-12 05:15:22 +00:00
Raymond Hettinger
f45abc97bf
Add method to OrderedDict for repositioning keys to the ends.
2010-09-06 21:26:09 +00:00
Daniel Stutzbach
e21624fb45
Merged revisions 84301 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84301 | daniel.stutzbach | 2010-08-24 15:49:57 -0500 (Tue, 24 Aug 2010) | 1 line
Issue 8750: Fixed MutableSet's methods to correctly handle reflexive operations, namely x -= x and x ^= x
........
2010-08-24 21:00:32 +00:00
Daniel Stutzbach
31da5b2f69
Issue 8750: Fixed MutableSet's methods to correctly handle reflexive operations, namely x -= x and x ^= x
2010-08-24 20:49:57 +00:00
Raymond Hettinger
0e708a1b79
Issue #9214 : Fix set operations on KeysView and ItemsView.
2010-08-22 07:56:20 +00:00
Raymond Hettinger
9117c75148
Issue #9214 : Fix set operations on KeysView and ItemsView.
2010-08-22 07:44:24 +00:00
Raymond Hettinger
d331ce9e66
Issue #9507 : Named tuple repr will now automatically display the right
...
name in a tuple subclass.
2010-08-08 01:13:42 +00:00
Mark Dickinson
16d037653d
Merged revisions 82821 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82821 | mark.dickinson | 2010-07-11 19:53:06 +0100 (Sun, 11 Jul 2010) | 3 lines
Issue #9137 : Fix issue in MutableMapping.update, which incorrectly
treated keyword arguments called 'self' or 'other' specially.
........
2010-07-11 19:27:06 +00:00
Mark Dickinson
b214e90e01
Issue #9137 : Fix issue in MutableMapping.update, which incorrectly
...
treated keyword arguments called 'self' or 'other' specially.
2010-07-11 18:53:06 +00:00
Benjamin Peterson
8e13de6725
Merged revisions 81417 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r81417 | benjamin.peterson | 2010-05-21 15:55:22 -0500 (Fri, 21 May 2010) | 9 lines
Merged revisions 81414 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81414 | benjamin.peterson | 2010-05-21 15:51:45 -0500 (Fri, 21 May 2010) | 1 line
return NotImplemented from Mapping when comparing to a non-mapping #8729
........
................
2010-05-21 21:05:45 +00:00
Benjamin Peterson
4ad6bd5482
Merged revisions 81414 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81414 | benjamin.peterson | 2010-05-21 15:51:45 -0500 (Fri, 21 May 2010) | 1 line
return NotImplemented from Mapping when comparing to a non-mapping #8729
........
2010-05-21 20:55:22 +00:00
Raymond Hettinger
9c01e441bb
Add a subtract() method to collections.Counter()
2010-04-03 10:32:58 +00:00
Georg Brandl
1b37e8728c
Merged revisions 78093 via svnmerge from
...
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.
........
2010-03-14 10:45:50 +00:00
Florent Xicluna
ce153f6f4d
Backport the tests only.
...
Merged revisions 78800 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78800 | florent.xicluna | 2010-03-08 16:20:28 +0100 (lun, 08 mar 2010) | 2 lines
#7624 : Fix isinstance(foo(), collections.Callable) for old-style classes.
........
2010-03-08 15:34:35 +00:00
R. David Murray
378c0cf5ab
Merged revisions 78351 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78351 | r.david.murray | 2010-02-22 19:24:49 -0500 (Mon, 22 Feb 2010) | 5 lines
Issue 6292: for the moment at least, the test suite passes if run
with -OO. Tests requiring docstrings are skipped. Patch by
Brian Curtin, thanks to Matias Torchinsky for helping review and
improve the patch.
........
2010-02-24 01:46:21 +00:00
Ezio Melotti
e96159335f
Merged revisions 77727 via svnmerge from
...
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
........
2010-01-24 19:26:24 +00:00
Ezio Melotti
b58e0bd8bb
use assert[Not]In where appropriate
2010-01-23 15:40:09 +00:00
Benjamin Peterson
577473fe68
use assert[Not]In where appropriate
...
A patch from Dave Malcolm.
2010-01-19 00:09:57 +00:00
Georg Brandl
ab91fdef1f
Merged revisions 73715 via svnmerge from
...
svn+ssh://svn.python.org/python/branches/py3k
........
r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line
convert old fail* assertions to assert*
........
2009-08-13 08:51:18 +00:00
Benjamin Peterson
c9c0f201fe
convert old fail* assertions to assert*
2009-06-30 23:06:06 +00:00
Raymond Hettinger
499b2ee8a8
Stronger tests for namedtuple() to prevent future name conflict errors.
2009-05-27 01:53:46 +00:00