Commit Graph

104 Commits

Author SHA1 Message Date
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