summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
Commit message (Collapse)AuthorAgeFilesLines
* asyncio: Ensure call_soon(), call_later() and call_at() are invoked on currentVictor Stinner2014-03-211-1/+22
| | | | | | loop in debug mode. Raise a RuntimeError if the event loop of the current thread is different. The check should help to debug thread-safetly issue. Patch written by David Foster.
* asyncio, Tulip issue 157: Improve test_events.py, avoid run_briefly() which isVictor Stinner2014-03-061-9/+6
| | | | not reliable
* asyncio: Synchronize with TulipVictor Stinner2014-03-052-2/+23
| | | | | | | | | | | | * Issue #159: Fix windows_utils.socketpair() - Use "127.0.0.1" (IPv4) or "::1" (IPv6) host instead of "localhost", because "localhost" may be a different IP address - Reject also invalid arguments: only AF_INET/AF_INET6 with SOCK_STREAM (and proto=0) are supported * Reject add/remove reader/writer when event loop is closed. * Fix ResourceWarning warnings
* asyncio, Tulip issue 158: Task._step() now also sets self to None if anVictor Stinner2014-03-041-1/+1
| | | | exception is raised. self is set to None to break a reference cycle.
* asyncio/windows_events.py: use more revelant names to overlapped callbacksVictor Stinner2014-02-262-12/+11
| | | | For example: "finish_recv", not just "finish".
* asyncio: Fix pyflakes warnings: remove unused variables and importsVictor Stinner2014-02-261-1/+0
|
* asyncio: Replace "unittest.mock" with "mock" in unit testsVictor Stinner2014-02-261-2/+2
| | | | | Use "from unittest import mock". It should simplify my work to merge new tests in Trollius, because Trollius uses "mock" backport for Python 2.
* asyncio: _check_resolved_address() must also accept IPv6 without flow_info andVictor Stinner2014-02-201-1/+1
| | | | scope_id: (host, port).
* asyncio: Fix _check_resolved_address() for IPv6 addressVictor Stinner2014-02-201-2/+5
|
* asyncio: remove unused imports and unused variables noticed by pyflakesVictor Stinner2014-02-206-9/+1
|
* asyncio: Fix _ProactorWritePipeTransport._pipe_closed()Victor Stinner2014-02-201-1/+1
| | | | The "exc" variable was not defined, pass a BrokenPipeError exception instead.
* asyncio.subprocess: Fix a race condition in communicate()Victor Stinner2014-02-201-2/+1
| | | | | Use self._loop instead of self._transport._loop, because transport._loop is set to None at process exit.
* asyncio, Tulip issue #136: Add get/set_debug() methods to BaseEventLoopTests.Victor Stinner2014-02-193-1/+19
| | | | | | Add also a PYTHONASYNCIODEBUG environment variable to debug coroutines since Python startup, to be able to debug coroutines defined directly in the asyncio module.
* asyncio: WriteTransport.set_write_buffer_size to call _maybe_pause_protocolYury Selivanov2014-02-191-2/+6
|
* asyncio: pep8-ify the code.Yury Selivanov2014-02-192-7/+9
|
* asyncio: Fix spelling and typos.Yury Selivanov2014-02-197-11/+11
| | | | Thanks to Vajrasky Kok for discovering some of them.
* asyncio, Tulip issue 143: UNIX domain methods, fix ResourceWarning andVictor Stinner2014-02-191-4/+4
| | | | | DeprecationWarning warnings. create_unix_server() closes the socket on any error, not only on OSError.
* asyncio, Tulip issue 139: Improve error messages on "fatal errors"Victor Stinner2014-02-193-22/+24
| | | | | 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").
* asyncio.transports: Make _ProactorBasePipeTransport use _FlowControlMixinYury Selivanov2014-02-184-125/+75
|
* asyncio: New error handling API. Issue #20681.Yury Selivanov2014-02-188-40/+229
|
* asyncio: Make tests pass on Windows.Guido van Rossum2014-02-181-1/+3
|
* asyncio: Add support for UNIX Domain Sockets.Yury Selivanov2014-02-185-37/+263
|
* ayncio, Tulip issue 129: BaseEventLoop.sock_connect() now raises an error ifVictor Stinner2014-02-133-13/+41
| | | | | the address is not resolved (hostname instead of an IP address) for AF_INET and AF_INET6 address families.
* asyncio: Change as_completed() to use a Queue, to avoid O(N**2) behavior. ↵Guido van Rossum2014-02-131-20/+33
| | | | Fixes issue #20566.
* asyncio.events: Use __slots__ in Handle and TimerHandleYury Selivanov2014-02-121-0/+4
|
* Issue #20505: Remove debug codeVictor Stinner2014-02-111-20/+0
|
* asyncio, Tulip issue 131: as_completed() and wait() now raises a TypeError ifVictor Stinner2014-02-111-0/+4
| | | | the list of futures is not a list but a Future, Task or coroutine object
* asyncio, Tulip issue 130: Add more checks on subprocess_exec/subprocess_shellVictor Stinner2014-02-112-5/+12
| | | | parameters
* asyncio, Tulip issue 126: call_soon(), call_soon_threadsafe(), call_later(),Victor Stinner2014-02-112-1/+10
| | | | | call_at() and run_in_executor() now raise a TypeError if the callback is a coroutine function.
* Issue #20505: use also the monotonic time to decide if asyncio debug tracesVictor Stinner2014-02-111-3/+4
| | | | should be printed
* Issue #20505: Oops, only print debug info if selector.select(timeout) took lessVictor Stinner2014-02-111-1/+1
| | | | than timeout
* Issue #20505: Improve debug info in asyncio event loopVictor Stinner2014-02-111-5/+18
|
* Issue #20505: Fix TestLoop, set the clock resolutionVictor Stinner2014-02-111-0/+1
|
* Issue #20505: BaseEventLoop uses again the resolution of the clock to decide ifVictor Stinner2014-02-101-2/+3
| | | | scheduled tasks should be executed or not.
* Issue #20505: Add debug info to analyze sporaric failures ofVictor Stinner2014-02-101-0/+6
| | | | test_timeout_rounding() on Windows XP buildbots.
* asyncio: Tulip issue 112: Inline make_handle() into Handle constructorVictor Stinner2014-02-095-12/+7
|
* asyncio: Remove more relics of resolution/granularity.Guido van Rossum2014-02-092-6/+0
|
* asyncio: Remove Process.subprocess attribute; it's too easy to get inconsistentVictor Stinner2014-02-091-4/+0
| | | | Process and Popen objects
* Issue #20505: Remove resolution and _granularity from selectors and asyncioVictor Stinner2014-02-073-14/+1
| | | | | * Remove selectors.BaseSelector.resolution attribute * Remove asyncio.BaseEventLoop._granularity attribute
* Issue #20505: add debug infoVictor Stinner2014-02-071-0/+10
|
* asyncio.tasks: Fix as_completed, gather & wait to work with duplicate coroutinesYury Selivanov2014-02-071-3/+4
|
* asyncio.tasks.gather: Fix docstringYury Selivanov2014-02-061-1/+1
|
* asyncio.streams.StreamReader: Add 'at_eof()' methodYury Selivanov2014-02-061-0/+4
|
* asyncio.streams: Use bytebuffer in StreamReader; Add assertion in feed_dataYury Selivanov2014-02-051-49/+24
|
* asyncio: Fix _ProactorWritePipeTransport._pipe_closed()Victor Stinner2014-02-041-1/+4
| | | | | Do nothing if the pipe is already closed. _loop_writing() may call _force_close() when it gets ConnectionResetError.
* asyncio.subprocess: Replace Process.get_subprocess() method with aVictor Stinner2014-02-031-1/+2
| | | | Process.subprocess read-only property
* Issue #20400: Merge Tulip into Python: add the new asyncio.subprocess moduleVictor Stinner2014-02-015-33/+230
| | | | | | | | | | | | | | | | | | | | * 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)
* Issue #20455: Add a resolution attribute to IocpProactor (1 ms)Victor Stinner2014-01-312-0/+2
|
* Issue #20455: asyncio: use the same code to round a timeout than the selectorsVictor Stinner2014-01-311-4/+9
| | | | | | module Sort also imports
* Issue #20455: asyncio: write a new write pipe transport class for proactor (onVictor Stinner2014-01-311-12/+26
| | | | | | | Windows) instead of using the "duplex" pipe transport. The new class uses a simpler overlapped read to be notified when the pipe is closed. So the protocol doesn't need to implement eof_received(): connection_lost() is called instead. _UnixWritePipeTransport has the same approach.