Victor Stinner
065ca25aae
asyncio, Tulip issue 139: Improve error messages on "fatal errors"
...
Mention if the error was caused by a read or a write, and be more specific on
the object (ex: "pipe transport" instead of "transport").
2014-02-19 01:40:41 +01:00
Yury Selivanov
ff827f08ac
asyncio: New error handling API. Issue #20681 .
2014-02-18 18:02:19 -05:00
Yury Selivanov
88a5bf0b2e
asyncio: Add support for UNIX Domain Sockets.
2014-02-18 12:15:06 -05:00
Victor Stinner
9141bff144
Issue #20667 : KqueueEventLoopTests.test_read_pty_output() hangs also on OpenBSD 5.5.
2014-02-18 09:13:47 +01:00
Victor Stinner
5afffeab73
Issue #20667 : test_asyncio: Skip KqueueEventLoopTests.test_read_pty_output() on
...
OpenBSD older than 5.5
2014-02-18 01:30:03 +01:00
Victor Stinner
740eedb826
Issue #20655 : Fix test_asyncio, run also subprocess tests. Patch written by
...
Vajrasky Kok.
2014-02-18 00:11:21 +01:00
Victor Stinner
1ff0ee0be2
Fix test_asyncio/test_events.py: skip IPv6 if IPv6 is disabled on the host
2014-02-13 10:46:05 +01:00
Victor Stinner
28773465e6
ayncio, Tulip issue 129: BaseEventLoop.sock_connect() now raises an error if
...
the address is not resolved (hostname instead of an IP address) for AF_INET and
AF_INET6 address families.
2014-02-13 09:24:37 +01:00
Guido van Rossum
b58f053e48
asyncio: Change as_completed() to use a Queue, to avoid O(N**2) behavior. Fixes issue #20566 .
2014-02-12 17:58:19 -08:00
Victor Stinner
13b493e8a7
Issue #20495 : Skip test_read_pty_output() of test_asyncio on FreeBSD older than
...
FreeBSD 8
2014-02-11 18:40:56 +01:00
Victor Stinner
eb74876e99
asyncio, Tulip issue 131: as_completed() and wait() now raises a TypeError if
...
the list of futures is not a list but a Future, Task or coroutine object
2014-02-11 11:54:08 +01:00
Victor Stinner
4e8d2f25e2
asyncio, Tulip issue 130: Add more checks on subprocess_exec/subprocess_shell
...
parameters
2014-02-11 11:44:56 +01:00
Victor Stinner
a125497ea3
asyncio, Tulip issue 126: call_soon(), call_soon_threadsafe(), call_later(),
...
call_at() and run_in_executor() now raise a TypeError if the callback is a
coroutine function.
2014-02-11 11:34:30 +01:00
Victor Stinner
6cf5c96630
Issue #20505 : BaseEventLoop uses again the resolution of the clock to decide if
...
scheduled tasks should be executed or not.
2014-02-10 23:42:32 +01:00
Victor Stinner
cf736f4e98
Issue #20505 : Use even shorter sleep in test_timeout_rounding() to make the
...
test more reliable (= fail more often on Windows with HPET enabled).
2014-02-10 19:17:46 +01:00
Victor Stinner
1c143b19c8
Issue #20505 : Add debug info to analyze sporaric failures of
...
test_timeout_rounding() on Windows XP buildbots.
2014-02-10 11:47:50 +01:00
Victor Stinner
dc62b7e261
asyncio: Tulip issue 112: Inline make_handle() into Handle constructor
2014-02-10 00:45:44 +01:00
Victor Stinner
0c3949c963
asyncio: Remove Process.subprocess attribute; it's too easy to get inconsistent
...
Process and Popen objects
2014-02-09 02:51:40 +01:00
Guido van Rossum
313f829ce8
asyncio: Test fix.
2014-02-08 17:35:09 -08:00
Victor Stinner
87bf2772be
asyncio tests: Remove scories of resolution/granularity
2014-02-09 01:25:52 +01:00
Victor Stinner
85310a50a9
Issue #20505 : Remove resolution and _granularity from selectors and asyncio
...
* Remove selectors.BaseSelector.resolution attribute
* Remove asyncio.BaseEventLoop._granularity attribute
2014-02-07 23:34:58 +01:00
Yury Selivanov
622be340fd
asyncio.tasks: Fix as_completed, gather & wait to work with duplicate coroutines
2014-02-06 22:06:16 -05:00
Yury Selivanov
f0020f5d77
asyncio.streams.StreamReader: Add 'at_eof()' method
2014-02-06 00:14:30 -05:00
Yury Selivanov
e694c9745f
asyncio.streams: Use bytebuffer in StreamReader; Add assertion in feed_data
2014-02-05 18:11:13 -05:00
Guido van Rossum
3b55f0c622
asyncio: Cosmetic improvement to test__run_once_logging() mock argument.
2014-02-04 14:27:14 -08:00
Victor Stinner
1703bbbf89
Oops, undo unwanted changes in test_asyncio: mistakes of my the last sync with
...
Tulip (changeset d7ac90c0463a)
2014-02-03 23:59:52 +01:00
Victor Stinner
b79eb0502c
asyncio.subprocess: Replace Process.get_subprocess() method with a
...
Process.subprocess read-only property
2014-02-03 23:08:14 +01:00
Victor Stinner
9dd39f524d
Issue #20472 : test_asyncio: skip PTY tests on Mac OS X older than 10.6
2014-02-03 00:32:13 +01:00
Victor Stinner
915bcb0111
Issue #20400 : Merge Tulip into Python: add the new asyncio.subprocess module
...
* Add a new asyncio.subprocess module
* Add new create_subprocess_exec() and create_subprocess_shell() functions
* The new asyncio.subprocess.SubprocessStreamProtocol creates stream readers
for stdout and stderr and a stream writer for stdin.
* The new asyncio.subprocess.Process class offers an API close to the
subprocess.Popen class:
- pid, returncode, stdin, stdout and stderr attributes
- communicate(), wait(), send_signal(), terminate() and kill() methods
* Remove STDIN (0), STDOUT (1) and STDERR (2) constants from base_subprocess
and unix_events, to not be confused with the symbols with the same name of
subprocess and asyncio.subprocess modules
* _ProactorBasePipeTransport.get_write_buffer_size() now counts also the size
of the pending write
* _ProactorBaseWritePipeTransport._loop_writing() may now pause the protocol if
the write buffer size is greater than the high water mark (64 KB by default)
2014-02-01 22:49:59 +01:00
Victor Stinner
a0aa88ce89
test_asyncio: relax timing, the "AMD64 Windows Server 2008 [SB] 3.x" buildbot
...
looks to be slow
2014-02-01 04:11:16 +01:00
Victor Stinner
55effc6dd0
Issue #20452 : Fix test_time_and_call_at() of test_asyncio on Windows
...
Use the granularity to check the minimum time delta, instead of arbitrary
value.
2014-02-01 02:18:52 +01:00
Victor Stinner
1144214639
Issue #20452 : test_asyncio checks also the granularity
2014-02-01 02:17:54 +01:00
Victor Stinner
62510dced9
Issue #20452 : test_asyncio: Add more info if the test fails
2014-01-31 16:39:10 +01:00
Victor Stinner
1506df2655
Issue #20455 : Add a resolution attribute to IocpProactor (1 ms)
2014-01-31 16:26:38 +01:00
Victor Stinner
49d0f4e428
Issue #20452 : Remove debug code, no more needed
2014-01-31 12:59:43 +01:00
Victor Stinner
dcd9740ad2
Issue #20452 : select and selectors round (again) timeout away from zero for
...
poll and epoll
Improve also debug info to analyze the issue
2014-01-31 12:12:53 +01:00
Victor Stinner
31f65044a9
Issue #20452 : Oops, fix debug code :-/
...
Add also event more debug info
2014-01-31 10:55:55 +01:00
Victor Stinner
0278032110
Issue #20452 : add more info in case of test_asyncio failure to try to debug the
...
failure on buildbot "x86 Ubuntu Shared 3.x"
2014-01-31 09:29:35 +01:00
Guido van Rossum
a849be9c64
asyncio: Fix misc whitespace issues.
2014-01-30 16:05:28 -08:00
Victor Stinner
9572898282
asyncio: Future.set_exception(exc) should instantiate exc if it is a class.
2014-01-30 16:01:54 -08:00
Victor Stinner
e623a12297
asyncio: subprocess_shell() and subprocess_exec() now raise ValueError instead of assert.
...
Moreover, bufsize different than 0 is now considered as an error.
2014-01-29 14:35:15 -08:00
Guido van Rossum
48c66c3dd8
asyncio: wait_for() now accepts None as timeout (Victor Stinner).
2014-01-29 14:30:38 -08:00
Guido van Rossum
fef7098ef9
asyncio: Rename {Empty,Full} to {QueueEmpty,QueueFull} and no longer get them from queue.py.
2014-01-25 17:24:51 -08:00
Guido van Rossum
ab3c88983b
asyncio: Locks refactor: use a separate context manager; remove Semaphore._locked.
2014-01-25 16:51:57 -08:00
Victor Stinner
669eeaf933
Merge latest Tulip into asyncio
...
- Make the new granularity attribute private
- Simplify BaseEventLoop._run_once(): avoid math.ceil(), use simple arithmetic
instead
2014-01-26 00:02:31 +01:00
Victor Stinner
128ee220e2
asyncio: Don't export BaseEventLoop, BaseSelectorEventLoop nor
...
BaseProactorEventLoop
Import them from submodules if you really need them.
2014-01-25 22:22:18 +01:00
Victor Stinner
8dffc456d7
Update asyncio from the Tulip project
...
Major changes:
- StreamReader.readexactly() now raises an IncompleteReadError if the
end of stream is reached before we received enough bytes, instead of
returning less bytes than requested.
- Unit tests use the main asyncio module instead of submodules like events
- _UnixWritePipeTransport now also supports character devices, as
_UnixReadPipeTransport. Patch written by Jonathan Slenders.
- Export more symbols: BaseEventLoop, BaseProactorEventLoop,
BaseSelectorEventLoop, Queue and Queue sublasses, Empty, Full
2014-01-25 15:32:06 +01:00
Victor Stinner
f67255ab94
Issue #20311 : asyncio: Add a granularity attribute to BaseEventLoop: maximum
...
between the resolution of the BaseEventLoop.time() method and the resolution of
the selector. The granuarility is used in the scheduler to round time and
deadline.
2014-01-25 15:01:33 +01:00
Victor Stinner
421e49b5c1
asyncio: wait_for() now cancels the future on timeout. Patch written by Gustavo
...
Carneiro.
2014-01-23 17:40:59 +01:00
Victor Stinner
8ce6e1100e
Close #20365 : Skip test_asyncio.test_events.test_read_pty_output() on Mac OS X
...
older than 10.9 (Maverick). kqueue doesn't support character devices (PTY) on
Mac OS X older than 10.9.
2014-01-23 17:26:06 +01:00