summaryrefslogtreecommitdiff
path: root/asyncio/test_utils.py
Commit message (Collapse)AuthorAgeFilesLines
* TestLoop.close() now calls the close() method of the parent class ↵Victor Stinner2015-01-141-0/+1
| | | | (BaseEventLoop)
* Python issue #22560: New SSL implementation based on ssl.MemoryBIOVictor Stinner2015-01-141-0/+5
| | | | | | | | | | | | | | | | | | | 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.
* Python issue #22641: On Python 3.4 and newer, the default SSL context forVictor Stinner2014-11-051-1/+12
| | | | | client connections is now created using ssl.create_default_context(), for stronger security. Patch written by Antoine Pitrou.
* Fix unit tests in debug mode: mock a non-blocking socket for socket operationsVictor Stinner2014-07-301-0/+6
| | | | which now raise an exception if the socket is blocking.
* tests: make quiet the logs of SSL handshake failures when running tests inVictor Stinner2014-07-141-0/+16
| | | | debug mode
* Tulip issue #185: Add a create_task() method to event loopsVictor Stinner2014-07-081-1/+1
| | | | | | | | | The create_task() method can be overriden in custom event loop to implement their own task class. For example, greenio and Pulsar projects use their own task class. The create_task() method is now preferred over creating directly task using the Task class.
* Backed out changeset b288da71fb40Victor Stinner2014-07-031-1/+1
| | | | Oops, I wanted to send this patch for review before
* Add asyncio.tasks.task_factory variableVictor Stinner2014-07-031-1/+1
| | | | | | | In the greenio project, Task._step() should not create Task objects but GreenTask to control how tasks are executed. Luca Sbardella already asked this feature for its Pulsar project to support coroutines using yield instead of yield-from.
* Python issue #21163: BaseEventLoop.run_until_complete() andVictor Stinner2014-06-301-0/+3
| | | | | test_utils.run_briefly() don't log the "destroy pending task" message anymore. The log is redundant for run_until_complete() and useless in run_briefly().
* Move coroutine code in the new module asyncio.coroutinesVictor Stinner2014-06-291-1/+2
|
* Refactor tests: add a base TestCase classVictor Stinner2014-06-181-0/+18
|
* Issue #173: Enhance repr(Handle) and repr(Task)Victor Stinner2014-06-121-0/+7
| | | | | | | | | | 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 #157: Improve test_events.py, avoid run_briefly() which is not reliableVictor Stinner2014-03-061-9/+6
|
* Fix pyflakes warnings: remove unused variables and importsVictor Stinner2014-02-261-1/+0
|
* Replace "unittest.mock" with "mock" in unit testsVictor Stinner2014-02-261-2/+2
| | | | | 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: remove unused imports and unused variables noticed by pyflakesVictor Stinner2014-02-201-1/+1
|
* Fix spelling & typosYury Selivanov2014-02-181-2/+2
|
* Add new event loop exception handling API (closes issue #80).Yury Selivanov2014-02-181-2/+16
| | | | | | | | New APIs: - loop.set_exception_handler() - loop.default_exception_handler() - loop.call_exception_handler()
* Add support for UNIX Domain Sockets. Closes issue #81.Yury Selivanov2014-02-181-34/+119
| | | | | | | | | New APIs: - loop.create_unix_connection - loop.create_unix_server - streams.open_unix_connection - streams.start_unix_server
* Issue #126: call_soon(), call_soon_threadsafe(), call_later(), call_at() andVictor Stinner2014-02-111-1/+4
| | | | | run_in_executor() now raise a TypeError if the callback is a coroutine function.
* Fix TestLoop, set the clock resolutionVictor Stinner2014-02-111-0/+1
|
* Issue #112: Inline make_handle() into Handle constructorVictor Stinner2014-02-101-2/+2
|
* Remove more relics of resolution/granularity.Guido van Rossum2014-02-081-5/+0
|
* Fix granularity of test_utils.TestLoopVictor Stinner2014-01-301-0/+1
|
* Add a granularity attribute to BaseEventLoop: maximum between the resolution ofVictor Stinner2014-01-251-0/+4
| | | | | the BaseEventLoop.time() method and the resolution of the selector. The granuarility is used in the scheduler to round time and deadline.
* Drop Tulip reference.Guido van Rossum2013-12-181-1/+1
|
* Remove duplicate import.Guido van Rossum2013-12-071-1/+0
|
* SSL hostname checking changes from CPython repo by Christian Heimes.Guido van Rossum2013-12-061-3/+3
|
* Incorporate selectors.py refactoring from CPython repo.Guido van Rossum2013-12-021-0/+14
|
* CPython issue #19297: fix resource warnings. Patch by Vajrasky Kok.Guido van Rossum2013-10-201-0/+1
|
* CPython issue #19305: fix sporadic test_asyncio failure on FreeBSD 10.0.Guido van Rossum2013-10-201-0/+15
|
* MergeGuido van Rossum2013-10-171-1/+1
|
* MergeGuido van Rossum2013-10-171-2/+6
|
* MergeGuido van Rossum2013-10-161-0/+7
|
* In test_utils.py, try two locations for test key/cert files.Guido van Rossum2013-10-151-0/+7
|
* Rename tulip package to asyncio.Guido van Rossum2013-10-141-0/+228