summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
Commit message (Collapse)AuthorAgeFilesLines
* asyncio, Tulip issue 137: In debug mode, add the traceback where the coroutineVictor Stinner2014-06-271-7/+10
| | | | object was created to the "coroutine ... was never yield from" log
* asyncio: Handle error handler: enhance formatting of the callbackVictor Stinner2014-06-251-2/+2
|
* asyncio, Tulip issue 177: Rewite repr() of Future, Task, Handle and TimerHandleVictor Stinner2014-06-253-53/+102
| | | | | | - Uniformize repr() output to format "<Class ...>" - On Python 3.5+, repr(Task) uses the qualified name instead of the short name of the coroutine
* asyncio: repr(Task) now also contains the line number even if the coroutine isVictor Stinner2014-06-241-2/+4
| | | | | | | | done: use the first line number of the code object instead of the current line number of the generator frame. The name of the coroutine is not enough because many coroutines may have the same name. It's a common case in asyncio tests for example.
* asyncio: Log an error if a Task is destroyed while it is still pendingVictor Stinner2014-06-242-0/+16
|
* asyncio: Fix BaseEventLoop._assert_is_current_event_loop(): get_event_loop()Victor Stinner2014-06-231-2/+5
| | | | raises an exception if there is no current loop
* asyncio, Tulip issue 171: BaseEventLoop.close() now raises an exception if theVictor Stinner2014-06-224-3/+7
| | | | | event loop is running. You must first stop the event loop and then wait until it stopped, before closing it.
* asyncio, Tulip issue 172: only log selector timing in debug modeVictor Stinner2014-06-221-2/+1
|
* asyncio: Enable the debug mode of event loops when the PYTHONASYNCIODEBUGVictor Stinner2014-06-221-1/+2
| | | | environment variable is set
* asyncio: BaseEventLoop._assert_is_current_event_loop() now only raises anVictor Stinner2014-06-221-1/+2
| | | | | | | | | | | | exception if the current loop is not None. Guido van Rossum wrote: "The behavior that you can set the loop to None (and keep track of it explicitly) is part of the spec, and this should still be supported even in debug mode. The behavior that we raise an error if you are caught having multiple active loops per thread is just a debugging heuristic, and it shouldn't break code that follows the spec."
* asyncio, Tulip issue 105: in debug mode, log callbacks taking more than 100 msVictor Stinner2014-06-201-5/+27
| | | | to be executed.
* Tulip issue 83: document more asyncio functions in docstringsVictor Stinner2014-06-192-7/+55
|
* Closes #21595: asyncio.BaseSelectorEventLoop._read_from_self() now reads allVictor Stinner2014-06-191-4/+9
| | | | | | available bytes from the "self pipe", not only a single byte. This change reduces the risk of having the pipe full and so getting the innocuous "BlockingIOError: [Errno 11] Resource temporarily unavailable" message.
* asyncio: Refactor tests: add a base TestCase classVictor Stinner2014-06-171-0/+18
|
* asyncio: Set __qualname__ attribute of CoroWrapper in @coroutine decorator onVictor Stinner2014-06-171-4/+6
| | | | | | | | | | | Python 3.5 - Drop __slots__ optimization of CoroWrapper to be able to set the __qualname__ attribute. - Add tests on __name__, __qualname__ and __module__ of a coroutine function and coroutine object. - Fix test_tasks when run in debug mode (PYTHONASYNCIODEBUG env var set) on Python 3.3 or 3.4
* Issue #21723: asyncio.Queue: support any type of number (ex: float) for theVictor Stinner2014-06-171-3/+3
| | | | maximum size. Patch written by Vajrasky Kok.
* asyncio: Task.__repr__() now also handles CoroWrapperVictor Stinner2014-06-161-1/+1
|
* asyncio: Tulip issue 173: Enhance repr(Handle) and repr(Task)Victor Stinner2014-06-123-2/+45
| | | | | | | | | | repr(Handle) is shorter for function: "foo" instead of "<function foo at 0x...>". It now also includes the source of the callback, filename and line number where it was defined, if available. repr(Task) now also includes the current position in the code, filename and line number, if available. If the coroutine (generator) is done, the line number is omitted and "done" is added.
* Issue #21596: asyncio.wait(): mention that the sequence of futures must notVictor Stinner2014-06-101-0/+2
| | | | be empty.
* Issue #21326: Add a new is_closed() method to asyncio.BaseEventLoopVictor Stinner2014-06-103-16/+42
| | | | | | | | | | | Add BaseEventLoop._closed attribute and use it to check if the event loop was closed or not, instead of checking different attributes in each subclass of BaseEventLoop. run_forever() and run_until_complete() methods now raise a RuntimeError('Event loop is closed') exception if the event loop was closed. BaseProactorEventLoop.close() now also cancels "accept futures".
* Tulip issue 83, Python issue #21252: Fill some XXX docstrings in asyncioVictor Stinner2014-06-052-14/+25
|
* Issue #21119: asyncio: Make sure that socketpair() close sockets on errorVictor Stinner2014-06-031-15/+17
| | | | Close the listening socket if sock.bind() raises an exception.
* Issue #21119: asyncio now closes sockets on errorsVictor Stinner2014-06-032-0/+11
| | | | | | Fix ResourceWarning: create_connection(), create_datagram_endpoint() and create_unix_server() methods of event loop now close the newly created socket on error.
* Issue #21601: Document asyncio.Task.cancel(). Initial patch written by VajraskyVictor Stinner2014-06-021-2/+2
| | | | Kok.
* Issue #21454: Fix asyncio.BaseEventLoop.connect_read_pipe docVictor Stinner2014-05-281-3/+3
| | | | The function sets the the pipe to non-blocking mode.
* Fix for raising exception not derived from BaseException in ↵Andrew Svetlov2014-05-271-1/+1
| | | | _SelectorSslTransport.resume_reading
* asyncio: Fix upstream issue 168: StreamReader.read(-1) from pipe may hang if ↵Guido van Rossum2014-05-121-6/+11
| | | | data exceeds buffer limit.
* asyncio: Upstream issue #167: remove dead code, by Marc Schlaich.Guido van Rossum2014-05-101-5/+1
|
* asyncio: Fix the second half of issue #21447: race in _write_to_self().Guido van Rossum2014-05-061-4/+11
|
* asyncio: Add __weakref__ slots to Handle and CoroWrapper. Upstream issue #166.Guido van Rossum2014-04-272-2/+2
|
* asyncio: Be careful accessing instance variables in __del__ (closes #21340).Guido van Rossum2014-04-271-1/+3
|
* asyncio: Add gi_{frame,running,code} properties to CoroWrapper (upstream #163).Guido van Rossum2014-04-151-0/+12
|
* asyncio.tasks: Make sure CoroWrapper.send proxies one argument correctlyYury Selivanov2014-04-151-0/+2
| | | | Issue #21209.
* asyncio.tasks: Fix CoroWrapper to workaround yield-from bug in CPython < 3.4.1Yury Selivanov2014-04-151-1/+4
| | | | Closes issue #21209.
* Issue #21155: asyncio.EventLoop.create_unix_server() now raises a ValueError ifVictor Stinner2014-04-071-0/+4
| | | | path and sock are specified at the same time.
* asyncio: Document Task.cancel() properly.Victor Stinner2014-04-071-0/+19
|
* 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
|