Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Closes #21886, #21447: Fix a race condition in asyncio when setting the result | Victor Stinner | 2014-07-05 | 2 | -0/+10 |
| | | | | | of a Future with call_soon(). Add an helper, a private method, to set the result only if the future was not cancelled. | ||||
* | asyncio: sync with Tulip | Victor Stinner | 2014-07-02 | 1 | -0/+11 |
| | | | | | | | | | | * _UnixSubprocessTransport: fix file mode of stdin. Open stdin in write mode, not in read mode * Examples: close the event loop at exit * More reliable CoroWrapper.__del__. If the constructor is interrupted by KeyboardInterrupt or the coroutine objet is destroyed lately, some the _source_traceback attribute doesn't exist anymore. * repr(Task): include also the future the task is waiting for | ||||
* | asyncio: Fix test_sleep_cancel(): call_later() mock has no self parameter | Victor Stinner | 2014-07-01 | 1 | -2/+2 |
| | |||||
* | asyncio: sync with Tulip | Victor Stinner | 2014-06-30 | 1 | -0/+1 |
| | | | | | | | | | | | - Sort imports - Simplify/optimize iscoroutine(). Inline inspect.isgenerator(obj): replace it with isinstance(obj, types.GeneratorType) - CoroWrapper: check at runtime if Python has the yield-from bug #21209. If Python has the bug, check if CoroWrapper.send() was called by yield-from to decide if parameters must be unpacked or not. - Fix "Task was destroyed but it is pending!" warning in test_task_source_traceback() | ||||
* | asyncio: sync with Tulip, add a new asyncio.coroutines module | Victor Stinner | 2014-06-28 | 1 | -17/+17 |
| | |||||
* | asyncio: Fix two "Coroutine xxx was never yielded from" messages in tests | Victor Stinner | 2014-06-27 | 1 | -2/+6 |
| | |||||
* | asyncio: Fix unit tests on Windows, escape filenames in regex | Victor Stinner | 2014-06-27 | 2 | -6/+6 |
| | |||||
* | asyncio, Tulip issue 137: In debug mode, save traceback where Future, Task and | Victor Stinner | 2014-06-27 | 4 | -6/+113 |
| | | | | | | | | | | | Handle objects are created. Pass the traceback to call_exception_handler() in the 'source_traceback' key. The traceback is truncated to hide internal calls in asyncio, show only the traceback from user code. Add tests for the new source_traceback, and a test for the 'Future/Task exception was never retrieved' log. | ||||
* | asyncio, Tulip issue 137: In debug mode, add the traceback where the coroutine | Victor Stinner | 2014-06-27 | 1 | -0/+32 |
| | | | | object was created to the "coroutine ... was never yield from" log | ||||
* | asyncio: Oops, restore a removed test | Victor Stinner | 2014-06-27 | 1 | -0/+3 |
| | |||||
* | Issue #21163: Fix one more "Task was destroyed but it is pending!" log in tests | Victor Stinner | 2014-06-25 | 1 | -2/+6 |
| | |||||
* | asyncio: sync with Tulip | Victor Stinner | 2014-06-25 | 2 | -0/+9 |
| | | | | | | - Python issue 21163: Fix more "Task was destroyed but it is pending!" logs in tests - Add test to check that run_until_complete() checks the loop of the future | ||||
* | Issue #21163, asyncio: Fix some "Task was destroyed but it is pending!" logs ↵ | Victor Stinner | 2014-06-25 | 3 | -16/+22 |
| | | | | in tests | ||||
* | asyncio, Tulip issue 177: Rewite repr() of Future, Task, Handle and TimerHandle | Victor Stinner | 2014-06-25 | 4 | -75/+129 |
| | | | | | | - 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 is | Victor Stinner | 2014-06-24 | 1 | -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 pending | Victor Stinner | 2014-06-24 | 2 | -4/+44 |
| | |||||
* | asyncio, Tulip issue 171: BaseEventLoop.close() now raises an exception if the | Victor Stinner | 2014-06-22 | 1 | -0/+9 |
| | | | | | 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 mode | Victor Stinner | 2014-06-22 | 1 | -0/+3 |
| | |||||
* | asyncio: Add an unit test to check that setting the PYTHONASYNCIODEBUG env var | Victor Stinner | 2014-06-22 | 2 | -4/+24 |
| | | | | enables debug mode of the event loop. | ||||
* | asyncio: Enable the debug mode of event loops when the PYTHONASYNCIODEBUG | Victor Stinner | 2014-06-22 | 4 | -12/+4 |
| | | | | environment variable is set | ||||
* | asyncio, Tulip issue 105: in debug mode, log callbacks taking more than 100 ms | Victor Stinner | 2014-06-20 | 1 | -0/+28 |
| | | | | to be executed. | ||||
* | asyncio: Fix pyflakes errors | Victor Stinner | 2014-06-18 | 3 | -5/+2 |
| | | | | | | - Add a missing import - Remove an unused import - Remove unused variables | ||||
* | asyncio: Refactor tests: add a base TestCase class | Victor Stinner | 2014-06-17 | 12 | -219/+127 |
| | |||||
* | asyncio: Refactor test__run_once_logging() to not rely on the exact number of | Victor Stinner | 2014-06-17 | 1 | -18/+11 |
| | | | | calls to time.monotonic(). Use a "fast select" and a "slow select" instead. | ||||
* | asyncio: Set __qualname__ attribute of CoroWrapper in @coroutine decorator on | Victor Stinner | 2014-06-17 | 1 | -8/+40 |
| | | | | | | | | | | | 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 the | Victor Stinner | 2014-06-17 | 1 | -0/+15 |
| | | | | maximum size. Patch written by Vajrasky Kok. | ||||
* | Sync asyncio with Tulip: Fix test_tasks for Python 3.5 | Victor Stinner | 2014-06-16 | 1 | -4/+8 |
| | | | | | | On Python 3.5, generator now gets their name from the function, no more from the code. So we get the expected "notmuch" name instead of the generic "coro" name. | ||||
* | asyncio: Tulip issue 173: Enhance repr(Handle) and repr(Task) | Victor Stinner | 2014-06-12 | 2 | -29/+78 |
| | | | | | | | | | | 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 #21326: Add a new is_closed() method to asyncio.BaseEventLoop | Victor Stinner | 2014-06-10 | 2 | -3/+28 |
| | | | | | | | | | | | 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". | ||||
* | Fix asyncio tests on Windows: wait for the subprocess exit | Victor Stinner | 2014-06-03 | 1 | -0/+2 |
| | | | | | Before, regrtest failed to remove the temporary test directory because the process was still running in this directory. | ||||
* | Issue #21651: Fix ResourceWarning when running asyncio tests on Windows. | Victor Stinner | 2014-06-03 | 1 | -0/+1 |
| | | | | Patch written by Claudiu Popa. | ||||
* | cleanup test_asyncio/test_base_events.py: cm variable was unused | Victor Stinner | 2014-06-03 | 1 | -1/+1 |
| | |||||
* | Issue #21119: asyncio: Make sure that socketpair() close sockets on error | Victor Stinner | 2014-06-03 | 1 | -0/+9 |
| | | | | Close the listening socket if sock.bind() raises an exception. | ||||
* | Issue #21119: asyncio now closes sockets on errors | Victor Stinner | 2014-06-03 | 2 | -0/+39 |
| | | | | | | Fix ResourceWarning: create_connection(), create_datagram_endpoint() and create_unix_server() methods of event loop now close the newly created socket on error. | ||||
* | Fix for raising exception not derived from BaseException in ↵ | Andrew Svetlov | 2014-05-27 | 1 | -0/+4 |
| | | | | _SelectorSslTransport.resume_reading | ||||
* | asyncio: test_base_events: use mock.Mock instead of unittest.mock.Mock to | Victor Stinner | 2014-05-20 | 1 | -1/+1 |
| | | | | simplify the synchronization with Trollius | ||||
* | Fix test-order-dependend asyncio test failure caused by rev ↵ | Guido van Rossum | 2014-05-13 | 1 | -6/+9 |
| | | | | 909ea8cc86bbab92dbb6231668f403b7360f30fa. | ||||
* | asyncio: Fix upstream issue 168: StreamReader.read(-1) from pipe may hang if ↵ | Guido van Rossum | 2014-05-12 | 1 | -0/+36 |
| | | | | data exceeds buffer limit. | ||||
* | asyncio: Fix the second half of issue #21447: race in _write_to_self(). | Guido van Rossum | 2014-05-06 | 1 | -2/+3 |
| | |||||
* | asyncio: Add __weakref__ slots to Handle and CoroWrapper. Upstream issue #166. | Guido van Rossum | 2014-04-27 | 2 | -0/+14 |
| | |||||
* | asyncio: Add gi_{frame,running,code} properties to CoroWrapper (upstream #163). | Guido van Rossum | 2014-04-15 | 1 | -0/+47 |
| | |||||
* | remove superfluous and useless line | Benjamin Peterson | 2014-04-16 | 1 | -1/+0 |
| | |||||
* | asyncio.tasks: Make sure CoroWrapper.send proxies one argument correctly | Yury Selivanov | 2014-04-15 | 1 | -0/+18 |
| | | | | Issue #21209. | ||||
* | asyncio.tasks: Fix CoroWrapper to workaround yield-from bug in CPython < 3.4.1 | Yury Selivanov | 2014-04-15 | 1 | -0/+25 |
| | | | | Closes issue #21209. | ||||
* | Issue #21155: asyncio.EventLoop.create_unix_server() now raises a ValueError if | Victor Stinner | 2014-04-07 | 1 | -0/+11 |
| | | | | path and sock are specified at the same time. | ||||
* | Issue #20668: Remove tests.txt of test_asyncio | Victor Stinner | 2014-03-31 | 1 | -14/+0 |
| | | | | It's useless, tests are now discovered automatically. | ||||
* | asyncio.tests: Autodiscover asyncio tests. Patch by Vajrasky Kok. Closes #20668 | Yury Selivanov | 2014-03-27 | 1 | -12/+10 |
| | |||||
* | asyncio: Ensure call_soon(), call_later() and call_at() are invoked on current | Victor Stinner | 2014-03-21 | 1 | -0/+23 |
| | | | | | | 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 is | Victor Stinner | 2014-03-06 | 1 | -64/+65 |
| | | | | not reliable | ||||
* | asyncio: Synchronize with Tulip | Victor Stinner | 2014-03-05 | 2 | -4/+50 |
| | | | | | | | | | | | | * 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 |