| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Only start reading when connection_made() has been called.
|
|
|
|
|
|
|
| |
* Rephrase also the comment explaining why the waiter is not awaken immediatly.
* SSLProtocol.eof_received() doesn't instanciate ConnectionResetError exception
directly, it will be done by Future.set_exception(). The exception is not
used if the waiter was cancelled or if there is no waiter.
|
| |
|
|
|
|
|
| |
Do nothing if the transport is already closed. Before it was not possible to
close the transport twice.
|
|
|
|
|
| |
Add "closed" or "closing" state in the __repr__() method of
_UnixReadPipeTransport and _UnixWritePipeTransport classes.
|
|
|
|
|
|
|
|
|
|
| |
* Yes, futures errors (Error, CancelledError, TimeoutError, ...) are aliases of
concurrent.futures errors
* InvalidStateError: the state is already logged in the message when the
exception is raised
* call_exception_handler() now makes possible to decide how to handle
exceptions
* Add a docstring to _UnixDefaultEventLoopPolicy
|
| |
|
|
|
|
| |
Mark the write end of the stdin pipe as non-inheritable.
|
|
|
|
|
|
|
| |
patch written by Torsten Landschoff.
create_task(), call_at(), call_soon(), call_soon_threadsafe() and
run_in_executor() now raise an error if the event loop is closed.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
Move the _loop attribute from the constructor of _SelectorTransport,
_ProactorBasePipeTransport and _UnixWritePipeTransport classes to the
constructor of the _FlowControlMixin class.
Add also an assertion to explicit that the parent class must ensure that the
loop is defined (not None)
|
| |
|
| |
|
|
|
|
| |
log all exceptions in debug mode
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
- Log stdin, stdout and stderr transports and protocols
- Log process identifier (pid)
- Log connection of pipes
- Log process exit
- Log Process.communicate() tasks: feed stdin, read stdout and stderr
- Add __repr__() method to many classes related to subprocesses
|
|
|
|
| |
_read_from_self().
|
|
|
|
|
|
|
|
|
|
| |
- Log most important socket events: socket connected, new client, connection
reset or closed by peer (EOF), etc.
- Log time elapsed in DNS resolution (getaddrinfo)
- Log pause/resume reading
- Log time of SSL handshake
- Log SSL handshake errors
- Add a __repr__() method to many classes
|
|
|
|
|
| |
protocol.connection_made() has been called. Document also why transport
constructors use a waiter.
|
|
|
|
|
| |
Future with call_soon(). Add an helper, an private method, to set the result
only if the future was not cancelled.
|
|
|
|
| |
Open stdin in write mode, not in read mode
|
| |
|
|
|
|
|
| |
loop is running. You must first stop the event loop and then wait until it
stopped, before closing it.
|
| |
|
|
|
|
|
|
|
| |
Fix ResourceWarning: BaseEventLoop.create_connection(),
BaseEventLoop.create_datagram_endpoint() and
_UnixSelectorEventLoop.create_unix_server() now close the newly created socket
on error.
|
|
|
|
| |
specified at the same time
|
| |
|
| |
|
|
|
|
|
| |
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").
|
| |
|
|
|
|
|
|
|
|
| |
New APIs:
- loop.set_exception_handler()
- loop.default_exception_handler()
- loop.call_exception_handler()
|
|
|
|
|
|
|
|
|
| |
New APIs:
- loop.create_unix_connection
- loop.create_unix_server
- streams.open_unix_connection
- streams.start_unix_server
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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)
* Add new subprocess examples: shell.py, subprocess_shell.py,
* subprocess_attach_read_pipe.py and subprocess_attach_write_pipe.py
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
log BrokenPipeError nor ConnectionResetError
Same behaviour than _SelectorTransport._fatal_error()
|
| |
|
| |
|
| |
|
|
|
|
| |
_UnixReadPipeTransport. Patch written by Jonathan Slenders.
|
| |
|
| |
|
| |
|
| |
|