Commit Graph

146 Commits

Author SHA1 Message Date
Serhiy Storchaka 2cefc1efa2 Issue #25616: Tests for OrderedDict are extracted from test_collections
into separate file test_ordered_dict.
2015-11-25 17:12:02 +02:00
Serhiy Storchaka 33e7ea5ad6 Issue #25616: Tests for OrderedDict are extracted from test_collections
into separate file test_ordered_dict.
2015-11-25 17:09:01 +02:00
Serhiy Storchaka 710cd34bdb Issue #25449: Fixed a crash and leaking NULL in repr() of OrderedDict that
was mutated by direct calls of dict methods.
2015-11-04 22:33:07 +02:00
Serhiy Storchaka b45b7b2137 Issue #25449: Iterating OrderedDict with keys with unstable hash now raises
KeyError in C implementations as well as in Python implementation.

Added tests for OrderedDict subclasses.
2015-11-04 22:05:38 +02:00
Serhiy Storchaka 14eefe353e Issue #25395: Fixed crash when highly nested OrderedDict structures were
garbage collected.
2015-11-01 16:12:34 +02:00
Serhiy Storchaka 992ec46acc Issue #25406: Fixed a bug in C implementation of OrderedDict.move_to_end()
that caused segmentation fault or hang in iterating after moving several
items to the start of ordered dict.
2015-10-14 19:21:24 +03:00
Raymond Hettinger 9157545c11 merge 2015-08-30 09:15:36 -07:00
Raymond Hettinger 7a3602e7cf Issue #24931: Resolve __dict__ conflict in namedtuple subclasses. 2015-08-30 09:13:48 -07:00
Eric Snow 8c7f9558eb Issue #24667: Resize odict in all cases that the underlying dict resizes. 2015-08-07 17:45:12 -06:00
Yury Selivanov fdbeb2b4b6 Issue #24400: Resurrect inspect.isawaitable()
collections.abc.Awaitable and collections.abc.Coroutine no longer
use __instancecheck__ hook to detect generator-based coroutines.

inspect.isawaitable() can be used to detect generator-based coroutines
and to distinguish them from regular generator objects.
2015-07-03 13:11:35 -04:00
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