Commit graph

37111 commits

Author SHA1 Message Date
Serhiy Storchaka
df573d6ad8 Issue #24134: assertRaises(), assertRaisesRegex(), assertWarns() and
assertWarnsRegex() checks now emits a deprecation warning when callable is
None or keyword arguments except msg is passed in the context manager mode.
2015-05-16 16:29:50 +03:00
Eric Snow
183a941bc1 Issue #24192: Fix namespace package imports. 2015-05-15 21:54:59 -06:00
Terry Jan Reedy
188c18d48f Merge 3.4 #23184: idle tests, remove unused names and imports. 2015-05-15 23:55:49 -04:00
Terry Jan Reedy
75fb816c78 Issue #23184: idle tests, remove unused names and imports. 2015-05-15 23:55:21 -04:00
Terry Jan Reedy
7fae66ccd7 Merge with 3.4 Issue #23184: idlelib, remove more unused names and imports. 2015-05-15 23:03:53 -04:00
Terry Jan Reedy
038c16b9a0 Issue #23184: idlelib, remove more unused names and imports. 2015-05-15 23:03:17 -04:00
Yury Selivanov
0cd2bf46ba Issue 24200: Fix broken unittest. 2015-05-15 12:55:20 -04:00
Yury Selivanov
f229bc5c53 inspect: Remove "0x..." IDs from Signature objects' __repr__
Issue 24200.
2015-05-15 12:53:56 -04:00
Yury Selivanov
3f6538fed0 Issue 22547: Implement informative __repr__ for inspect.BoundArguments 2015-05-14 18:47:17 -04:00
Yury Selivanov
6b4046f062 Merge 2015-05-14 18:33:14 -04:00
Yury Selivanov
4cfd4eac7d inspect: Test that BoundArguments.__eq__ repects the order of params 2015-05-14 18:30:27 -04:00
Yury Selivanov
692b340092 inspect: Micro-optimize __eq__ for Signature, Parameter and BoundArguments
Provide __ne__ method for consistency.
2015-05-14 18:20:01 -04:00
Terry Jan Reedy
8aad7f27a4 Merge with 3.4 2015-05-14 18:11:14 -04:00
Terry Jan Reedy
2733618fd9 idlelib: remove unused names and imports (one is a duplicate import). 2015-05-14 18:10:50 -04: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
Yury Selivanov
6abe03288b inspect: Add __slots__ to BoundArguments. 2015-05-13 17:18:41 -04:00
Yury Selivanov
9113dc7c97 Issue 24017: More tests for 'async for' and 'async with'. 2015-05-13 16:49:35 -04:00
Yury Selivanov
c41632a856 asyncio/tests: Drop unused import. 2015-05-13 15:37:48 -04:00
Yury Selivanov
6c792bd65a asyncio: Add a test for asyncio.iscoroutine().
Test that asyncio.iscoroutine() supports 'async def' coroutines and
collections.abc.Coroutine types.
2015-05-13 15:34:12 -04:00
Yury Selivanov
af928b65fc asyncio: Use 'collections.abc.Coroutine' in asyncio.iscoroutine. 2015-05-13 15:22:03 -04:00
Yury Selivanov
c58cca5951 asyncio: Use 'collections.abc.Coroutine' in asyncio.iscoroutine (in 3.5) 2015-05-13 15:21:41 -04:00
Yury Selivanov
d08c363c26 Sync asyncio code from default branch. 2015-05-13 15:15:56 -04:00
Yury Selivanov
33c6b569b7 Issue 24179: Support 'async for' for asyncio.StreamReader. 2015-05-13 14:23:29 -04:00
Yury Selivanov
29f88c22e6 Issue 24178: support 'async with' for asyncio locks. 2015-05-13 14:10:38 -04:00
Berker Peksag
50c72d2778 Issue #22064: Improve the misleading message from 2to3 when skipping optional fixers.
Patch by Vinod Kurup.
2015-05-13 13:40:12 +03:00
Berker Peksag
3a81f9ba46 Issue #22064: Improve the misleading message from 2to3 when skipping optional fixers.
Patch by Vinod Kurup.
2015-05-13 13:39:51 +03:00
Berker Peksag
2f3742b0d8 Issue #1322: platform.dist() and platform.linux_distribution() functions are now deprecated.
Initial patch by Vajrasky Kok.
2015-05-13 12:32:20 +03:00
Raymond Hettinger
eac503aeac Issue #24064: Property() docstrings are now writeable.
(Patch by Berker Peksag.)
2015-05-13 01:09:59 -07:00
Zachary Ware
37ac590f7c Clean up test_coroutines a bit.
No more test_main(), s/assertEquals/assertEqual/, and remove unused import.
2015-05-13 01:03:06 -05:00
Nick Coghlan
baaadbf70d Issue 24017: fix for "async with" refcounting
* adds missing INCREF in WITH_CLEANUP_START
* adds missing DECREF in WITH_CLEANUP_FINISH
* adds several new tests Yury created while investigating this
2015-05-13 15:54:02 +10:00
Zachary Ware
84d3e764d7 Issue #23911: Fix ctypes test on Windows.
Comparing equality of list and tuple is always False.
2015-05-13 00:34:39 -05:00
Zachary Ware
d9b25bb511 Issue #23731: Fix tracemalloc test on Windows.
'a.pyo' can no longer match 'a.py', so 'a.PYO' can't either.
2015-05-13 00:27:01 -05:00
Zachary Ware
ad3e27ae4c Issue #23193: Skip numeric_owner tests on platforms where they don't make sense
In particular, the tests bomb out on Windows.  The feature is a no-op on platforms
without the pwd module or os.geteuid anyway.
2015-05-12 23:57:21 -05:00
Raymond Hettinger
849564f874 Extend test coverage to include heapifying large heaps 2015-05-12 21:42:40 -07:00
Raymond Hettinger
ffcd8490d0 Reduce the overhead in functools.total_ordering by localizing NotImplemented.
(Sugguested by Serhiy Storchaka)
2015-05-12 21:26:37 -07:00
Serhiy Storchaka
cd4a5cc339 Added forgotten new files for issues #22681 and #22682. 2015-05-13 00:34:53 +03:00
Serhiy Storchaka
48e47aaa28 Issue #22486: Added the math.gcd() function. The fractions.gcd() function now is
deprecated.  Based on patch by Mark Dickinson.
2015-05-13 00:19:51 +03:00
Serhiy Storchaka
f0eeedf0d8 Issue #22681: Added support for the koi8_t encoding. 2015-05-12 23:24:19 +03:00
Serhiy Storchaka
ad8a1c3fb2 Issue #22682: Added support for the kz1048 encoding. 2015-05-12 23:16:55 +03:00
Yury Selivanov
fdba8381ff Issue #24017: Unset asyncio event loop after test. 2015-05-12 14:28:08 -04:00
Yury Selivanov
08a7a4e592 asyncio: Make sure sys.set_coroutine_wrapper is called *only* when loop is running.
Previous approach of installing coroutine wrapper in loop.set_debug() and
uninstalling it in loop.close() was very fragile.  Most of asyncio tests
do not call loop.close() at all.  Since coroutine wrapper is a global
setting, we have to make sure that it's only set when the loop is
running, and is automatically unset when it stops running.

Issue #24017.
2015-05-12 11:43:35 -04:00
Yury Selivanov
e8944cb217 asyncio: Make sure sys.set_coroutine_wrapper is called *only* when loop is running.
Previous approach of installing coroutine wrapper in loop.set_debug() and
uninstalling it in loop.close() was very fragile.  Most of asyncio tests
do not call loop.close() at all.  Since coroutine wrapper is a global
setting, we have to make sure that it's only set when the loop is
running, and is automatically unset when it stops running.

Issue #24017.
2015-05-12 11:43:04 -04:00
Berker Peksag
ea6d5592f2 Issue #23796: peak and read1 methods of BufferedReader now raise ValueError
if they called on a closed object.

Patch by John Hergenroeder.
2015-05-12 17:13:56 +03:00
Berker Peksag
d10d6ae2fa Issue #23796: peak and read1 methods of BufferedReader now raise ValueError
if they called on a closed object.

Patch by John Hergenroeder.
2015-05-12 17:01:05 +03:00
Serhiy Storchaka
bedbf96e84 Issue #23870: The pprint module now supports all standard collections
except named tuples.
2015-05-12 13:35:48 +03:00
Yury Selivanov
7544508f02 PEP 0492 -- Coroutines with async and await syntax. Issue #24017. 2015-05-11 22:57:16 -04:00
Yury Selivanov
dc6a9c0423 asyncio: Merge 3.4 -- Support PEP 492. Issue #24017. 2015-05-11 22:31:19 -04:00
Yury Selivanov
1af2bf75a2 asyncio: Support PEP 492. Issue #24017. 2015-05-11 22:27:25 -04:00