| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
* 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()
|
| |
|
|
|
|
|
| |
Do nothing if the transport is already closed. Before it was not possible to
close the transport twice.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* Fix pyflakes warnings: remove unused imports and variables
* asyncio.test_support now uses test.support and test.script_helper if available
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
Patch by Ludovic.Gasc.
|
| |
|
|
|
|
|
| |
* Tulip issue 194: Don't use sys.getrefcount() in unit tests
* signal.set_wakeup_fd() can now raise an OSError on Python 3.5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
environment variable is set
|
| |
|
|
|
|
|
|
| |
Fix ResourceWarning: create_connection(), create_datagram_endpoint() and
create_unix_server() methods of event loop now close the newly created socket
on error.
|
| |
|
| |
|
|
|
|
|
| |
Use "from unittest import mock". It should simplify my work to merge new tests
in Trollius, because Trollius uses "mock" backport for Python 2.
|
| |
|
|
|
|
| |
Thanks to Vajrasky Kok for discovering some of them.
|
|
|
|
|
| |
DeprecationWarning warnings. create_unix_server() closes the socket on any
error, not only on OSError.
|
|
|
|
|
| |
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").
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
handlers. Should fix buildbot issues.
|
| |
|
|
|
|
| |
hang).
|
|
|
|
|
| |
This should have no effect, it's a "shouldn't happe" case.
Also tidied up some comments.
|
| |
|
|
|
|
| |
timeout in test_call_later().
|
| |
|
| |
|
|
|