| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Only start reading when connection_made() has been called.
|
|
|
|
|
|
|
|
| |
Don't call protocol.connection_lost() if protocol.connection_made() was not
called yet: if the SSL handshake failed or is still in progress.
The close() method can be called if the creation of the connection is
cancelled, by a timeout for example.
|
|
|
|
|
| |
Only start reading when connection_made() has been called:
protocol.data_received() must not be called before protocol.connection_made().
|
|
|
|
| |
Wake-up the waiter if it is not done yet.
|
| |
|
|
|
|
|
|
|
| |
Use a coroutine with asyncio.sleep() instead of call_later() to ensure that the
schedule call is cancelled.
Add also a unit test cancelling connect_pipe().
|
| |
|
|
|
|
|
|
|
|
| |
* Handle correctly CancelledError: just exit
* On error, log the exception and exit
Don't try to close the event loop, it is probably running and so it cannot be
closed.
|
| |
|
|
|
|
|
|
|
| |
Override the connect_read_pipe() method of the loop to mock immediatly
pause_reading() and resume_reading() methods.
The test failed randomly on FreeBSD 9 buildbot and on Windows using trollius.
|
| |
|
|
|
|
|
|
|
|
|
| |
* Use test_utils.run_briefly() to execute pending calls to really close
transports
* sslproto: mock also _SSLPipe.shutdown(), it's need to close the transport
* pipe test: the test doesn't close explicitly the PipeHandle, so ignore
the warning instead
* test_popen: use the context manager ("with p:") to explicitly close pipes
|
| |
|
| |
|
|
|
|
|
| |
Do nothing if the transport is already closed. Before it was not possible to
close the transport twice.
|
|
|
|
| |
Skip SSL tests on the ProactorEventLoop if ssl.MemoryIO is missing
|
| |
|
|
|
|
|
|
| |
before setting its exception.
Add unit tests for this case.
|
|
|
|
|
|
| |
cancelled waiter.
Add unit test cancelling subprocess methods.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new SSL implementation is based on the new ssl.MemoryBIO which is only
available on Python 3.5. On Python 3.4 and older, the legacy SSL implementation
(using SSL_write, SSL_read, etc.) is used. The proactor event loop only
supports the new implementation.
The new asyncio.sslproto module adds _SSLPipe, SSLProtocol and
_SSLProtocolTransport classes. _SSLPipe allows to "wrap" or "unwrap" a socket
(switch between cleartext and SSL/TLS).
Patch written by Antoine Pitrou. sslproto.py is based on gruvi/ssl.py of the
gruvi project written by Geert Jansen.
This change adds SSL support to ProactorEventLoop on Python 3.5 and newer!
It becomes also possible to implement STARTTTLS: switch a cleartext socket to
SSL.
|
|
|
|
| |
Pass explicitly the event loop to StreamReaderProtocol.
|
|
|
|
|
|
| |
RuntimeError if the selector is closed. And selectors.BaseSelector.close() now
clears its internal reference to the selector mapping to break a reference
cycle. Initial patch written by Martin Richard.
|
|
|
|
|
|
|
| |
loop parameter is not set
Add unit tests to ensure that constructor of StreamReader and
StreamReaderProtocol classes get the event loop.
|
|
|
|
|
|
|
|
| |
Python 3.3
* Use time.time if time.monotonic is not available
* Get socketpair from asyncio.test_utils
* Get selectors from asyncio.selectors
|
| |
|
| |
|
|
|
|
| |
future before setting its result.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
methods of BaseEventLoop now use the identifier of the current thread to ensure
that they are called from the thread running the event loop.
Before, the get_event_loop() method was used to check the thread, and no
exception was raised when the thread had no event loop. Now the methods always
raise an exception in debug mode when called from the wrong thread. It should
help to notice misusage of the API.
|
| |
|
| |
|
| |
|
|
|
|
| |
module to run the asyncio test suite. The test module is rarely installed.
|
|
|
|
| |
no event loop even if assertions are disabled.
|
|
|
|
| |
Mark the write end of the stdin pipe as non-inheritable.
|
|
|
|
| |
transport
|
|
|
|
| |
loop if a BaseException is raised, because the event loop is already stopped.
|
|
|
|
|
| |
* mock also resume_reading()
* ensure that resume_reading() is called
|
|
|
|
| |
Storchaka.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
functions. Patch by Donald Stufft.
|
|
|
|
|
| |
objects in the SubprocessStreamProtocol. It allows to pause the transport to
not buffer too much stdout or stderr data.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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).
|
| |
|
|
|
|
| |
Add an unit test to check for non regression
|
| |
|
|
|
|
| |
(Antoine Pitrou)
|
|
|
|
| |
Patch by Ludovic.Gasc.
|
|
|
|
|
| |
client connections is now created using ssl.create_default_context(), for
stronger security. Patch written by Antoine Pitrou.
|
|
|
|
|
|
|
|
|
| |
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)
|