summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_unix_events.py
Commit message (Collapse)AuthorAgeFilesLines
* Use os.devnull instead of hardcoded '/dev/null'.Serhiy Storchaka2015-02-151-3/+3
|
* asyncio: sync with TulipVictor Stinner2015-01-291-18/+11
| | | | | | | | | * Cleanup gather(): use cancelled() method instead of using private Future attribute * Fix _UnixReadPipeTransport and _UnixWritePipeTransport. Only start reading when connection_made() has been called. * Issue #23333: Fix BaseSelectorEventLoop._accept_connection(). Close the transport on error. In debug mode, log errors using call_exception_handler()
* Issue #23243: Close explicitly transports in asyncio testsVictor Stinner2015-01-151-94/+60
|
* Issue #23243: Fix asyncio._UnixWritePipeTransport.close()Victor Stinner2015-01-151-0/+3
| | | | | Do nothing if the transport is already closed. Before it was not possible to close the transport twice.
* asyncio: sync with TulipVictor Stinner2015-01-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | * PipeHandle now uses None instead of -1 for a closed handle * Sort imports in windows_utils. * Fix test_events on Python older than 3.5. Skip SSL tests on the ProactorEventLoop if ssl.MemoryIO is missing * Fix BaseEventLoop._create_connection_transport(). Close the transport if the creation of the transport (if the waiter) gets an exception. * _ProactorBasePipeTransport now sets _sock to None when the transport is closed. * Fix BaseSubprocessTransport.close(). Ignore pipes for which the protocol is not set yet (still equal to None). * TestLoop.close() now calls the close() method of the parent class (BaseEventLoop). * Cleanup BaseSelectorEventLoop: create the protocol on a separated line for readability and ease debugging. * Fix BaseSubprocessTransport._kill_wait(). Set the _returncode attribute, so close() doesn't try to terminate the process. * Tests: explicitly close event loops and transports * UNIX pipe transports: add closed/closing in repr(). Add "closed" or "closing" state in the __repr__() method of _UnixReadPipeTransport and _UnixWritePipeTransport classes.
* asyncio: sync with TulipVictor Stinner2014-12-261-2/+0
| | | | | * Fix pyflakes warnings: remove unused imports and variables * asyncio.test_support now uses test.support and test.script_helper if available
* asyncio: Coroutine objects are now rejected with a TypeError by the followingVictor Stinner2014-11-201-4/+10
| | | | | | | | | | | | | | functions: * add_signal_handler() * call_at() * call_later() * call_soon() * call_soon_threadsafe() * run_in_executor() Fix also the error message of add_signal_handler() (fix the name of the function).
* - Issue #22841: Reject coroutines in asyncio add_signal_handler().Guido van Rossum2014-11-141-0/+12
| | | | Patch by Ludovic.Gasc.
* asyncio: Use the new os.set_blocking() function of Python 3.5 if availableVictor Stinner2014-07-291-6/+6
|
* asyncio: sync with TulipVictor Stinner2014-07-231-9/+8
| | | | | * Tulip issue 194: Don't use sys.getrefcount() in unit tests * signal.set_wakeup_fd() can now raise an OSError on Python 3.5
* Python issue #21645, Tulip issue 192: Rewrite signal handlingVictor Stinner2014-07-171-2/+2
| | | | | | | | | | | | | | | | | | | Since Python 3.3, the C signal handler writes the signal number into the wakeup file descriptor and then schedules the Python call using Py_AddPendingCall(). asyncio uses the wakeup file descriptor to wake up the event loop, and relies on Py_AddPendingCall() to schedule the final callback with call_soon(). If the C signal handler is called in a thread different than the thread of the event loop, the loop is awaken but Py_AddPendingCall() was not called yet. In this case, the event loop has nothing to do and go to sleep again. Py_AddPendingCall() is called while the event loop is sleeping again and so the final callback is not scheduled immediatly. This patch changes how asyncio handles signals. Instead of relying on Py_AddPendingCall() and the wakeup file descriptor, asyncio now only relies on the wakeup file descriptor. asyncio reads signal numbers from the wakeup file descriptor to call its signal handler.
* asyncio: Enable the debug mode of event loops when the PYTHONASYNCIODEBUGVictor Stinner2014-06-221-8/+0
| | | | environment variable is set
* asyncio: Refactor tests: add a base TestCase classVictor Stinner2014-06-171-23/+17
|
* Issue #21119: asyncio now closes sockets on errorsVictor Stinner2014-06-031-0/+18
| | | | | | Fix ResourceWarning: create_connection(), create_datagram_endpoint() and create_unix_server() methods of event loop now close the newly created socket on error.
* remove superfluous and useless lineBenjamin Peterson2014-04-161-1/+0
|
* asyncio: Fix pyflakes warnings: remove unused variables and importsVictor Stinner2014-02-261-10/+6
|
* asyncio: Replace "unittest.mock" with "mock" in unit testsVictor Stinner2014-02-261-95/+95
| | | | | 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: pep8-ify the code.Yury Selivanov2014-02-191-2/+4
|
* asyncio: Fix spelling and typos.Yury Selivanov2014-02-191-3/+3
| | | | Thanks to Vajrasky Kok for discovering some of them.
* asyncio, Tulip issue 143: UNIX domain methods, fix ResourceWarning andVictor Stinner2014-02-191-13/+15
| | | | | 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-191-3/+5
| | | | | 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: New error handling API. Issue #20681.Yury Selivanov2014-02-181-14/+25
|
* asyncio: Add support for UNIX Domain Sockets.Yury Selivanov2014-02-181-1/+81
|
* Update asyncio from the Tulip projectVictor Stinner2014-01-251-26/+25
| | | | | | | | | | | | | | | | 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
* asyncio: Change mock pipe to mock socket. Hope to fix issue 19750.Guido van Rossum2013-11-251-1/+1
|
* asyncio: Refactor waitpid mocks. Patch by Anthony Baire.Guido van Rossum2013-11-151-249/+186
|
* Issue #19589: Use specific asserts in asyncio tests.Serhiy Storchaka2013-11-141-1/+1
|
* asyncio: Fix from Anthony Baire for CPython issue 19566 (replaces earlier fix).Guido van Rossum2013-11-131-13/+16
|
* asyncio: Add close() back to Unix selector event loop, to remove all signal ↵Guido van Rossum2013-11-071-0/+16
| | | | handlers. Should fix buildbot issues.
* asyncio: Refactor SIGCHLD handling. By Anthony Baire.Guido van Rossum2013-11-041-118/+869
|
* Switch subprocess stdin to a socketpair, attempting to fix issue #19293 (AIX ↵Guido van Rossum2013-10-221-0/+7
| | | | hang).
* asyncio: be more lenient if we don't understand status returned by waitpid().Guido van Rossum2013-10-211-1/+1
| | | | | This should have no effect, it's a "shouldn't happe" case. Also tidied up some comments.
* Make various asyncio test files individually runnableAntoine Pitrou2013-10-201-0/+4
|
* Rename Transport.pause/resume to pause_reading/pause_writing. Also relax ↵Guido van Rossum2013-10-181-4/+4
| | | | timeout in test_call_later().
* Rename the logger to plain "logger".Guido van Rossum2013-10-171-7/+7
|
* Make asyncio tests run on Windows.Guido van Rossum2013-10-171-0/+3
|
* Initial checkin of asyncio package (== Tulip, == PEP 3156).Guido van Rossum2013-10-171-0/+767