Commit graph

145 commits

Author SHA1 Message Date
Yury Selivanov
d48fb485d9 Merge 3.5 (Issue #24400) 2015-07-03 13:11:54 -04: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
f02dcc8803 Merge from 3.5. 2015-06-04 00:12:14 -06:00
Eric Snow
4fabf02633 Issue #24369: Defend against key-changes during iteration. 2015-06-04 00:09:56 -06:00
Eric Snow
d14de5e22d Merge from 3.5. 2015-06-02 20:43:37 -06:00
Eric Snow
ac02ef373f Issue #24368: Support keyword arguments in OrderedDict methods. 2015-06-02 20:42:14 -06:00
Eric Snow
ec6cd162de Merge from 3.5. 2015-06-01 23:35:40 -06:00
Eric Snow
b952ab43f2 Issue #24359: Check for changed OrderedDict size during iteration. 2015-06-01 23:35:13 -06:00
Eric Snow
e9dd08d08c Merge from 3.5. 2015-06-01 23:14:26 -06:00
Eric Snow
d171975609 Issue #24348: Drop superfluous increfs/decrefs. 2015-06-01 23:12:13 -06:00
Eric Snow
c976b73002 Merge from 3.5. 2015-06-01 23:06:20 -06:00
Eric Snow
a762af74b2 Issue #24347: Set KeyError if PyDict_GetItemWithError returns NULL. 2015-06-01 22:59:08 -06:00
Eric Snow
e39facfdbc Issue #16991: Ensure that the proper OrderedDict is used in tests. 2015-05-30 13:24:54 -06:00
Eric Snow
3ef8958e40 Merge from 3.5. 2015-05-30 12:00:05 -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