| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
(cherry picked from commit d019bc8319ea35e93bf4baa38098ff1b57cd3ee5)
|
|
|
|
|
|
| |
(GH-4314) (#4322)
* bpo-31970: Reduce performance overhead of asyncio debug mode..
(cherry picked from commit 921e9432a1461bbf312c9c6dcc2b916be6c05fa0)
|
|
|
| |
(cherry picked from commit de34cbe9cdaaf7b85fed86f99c2fd071e1a7b1d2)
|
|
|
|
| |
(#2109)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when there are no more `await` or `yield (from)` before return in coroutine,
cancel was ignored.
example:
async def coro():
asyncio.Task.current_task().cancel()
return 42
...
res = await coro() # should raise CancelledError
(cherry picked from commit 991adca012f5e106c2d4040ce619c696ba6f9c46)
|
| |
|
| |
|
|\ |
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| | |
when called from coroutines or callbacks.
|
|/
|
|
|
|
|
|
| |
This implementation provides additional 10-20% speed boost for
asyncio programs.
The patch also fixes _asynciomodule.c to use Arguments Clinic, and
makes '_schedule_callbacks' an overridable method (as it was in 3.5).
|
|
|
|
|
|
| |
are done.
Patch by Johannes Ebke.
|
| |
|
| |
|
|
|
|
|
|
|
| |
It will probably be added back in Python 3.6, once its compatibility
issues are resolved; see [1] for more details.
[1] https://mail.python.org/pipermail/async-sig/2016-June/000045.html
|
|
|
|
|
|
|
|
|
|
|
| |
Issue #26777: Fix random failing of the test on the "AMD64 FreeBSD 9.x 3.5"
buildbot:
File ".../Lib/test/test_asyncio/test_tasks.py", line 2398, in go
self.assertTrue(0.09 < dt < 0.11, dt)
AssertionError: False is not true : 0.11902812402695417
Replace "< 0.11" with "< 0.15".
|
|
|
|
|
|
| |
Fix GH#325: Allow to pass None as a timeout value to disable timeout logic.
Change written by Andrew Svetlov and merged by Guido van Rossum.
|
|
|
|
| |
Patch by Vladimir Rutsky.
|
|
|
|
|
| |
Accept time delta up to 0.12 second, instead of 0.11, for the "AMD64 FreeBSD
9.x" buildbot slave.
|
| |
|
| |
|
|
|
|
| |
See https://github.com/python/asyncio/pull/303 for details
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
without __name__.
|
| |
|
| |
|
|
|
|
|
| |
* Fix pyflakes warnings: remove unused imports and variables
* asyncio.test_support now uses test.support and test.script_helper if available
|
| |
|
| |
|
|
|
|
|
|
| |
Don't raise a TimeoutError if we reached the timeout and the future completed
in the same iteration of the event loop. A side effect of the bug is that
Queue.get() looses items.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* _WaitHandleFuture.cancel() now notify IocpProactor through the overlapped
object that the wait was cancelled.
* Optimize IocpProactor.wait_for_handle() gets the result if the wait is
signaled immediatly.
* Enhance representation of Future and Future subclasses
- Add "created at filename:lineno" in the representation
- Add Future._repr_info() method which can be more easily overriden than
Future.__repr__(). It should now be more easy to enhance Future
representation without having to modify each subclass. For example,
_OverlappedFuture and _WaitHandleFuture get the new "created at" information.
- Use reprlib to format Future result, and function arguments when formatting a
callback, to limit the length of the representation.
* Fix repr(_WaitHandleFuture)
* _WaitHandleFuture and _OverlappedFuture: hide frames of internal calls in the
source traceback.
* Cleanup ProactorIocp._poll(): set the timeout to 0 after the first call to
GetQueuedCompletionStatus()
* test_locks: close the temporary event loop and check the condition lock
* Remove workaround in test_futures, no more needed
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Tulip issue #182: Improve logs of BaseEventLoop._run_once()
- Don't log non-blocking poll
- Only log polling with a timeout if it gets events or if it timed out after
more than 1 second.
* Fix some pyflakes warnings: remove unused imports
|
|
|
|
|
|
|
| |
- CoroWrapper.__del__() now reuses repr(CoroWrapper) to log the "... was never
yielded from" warning
- Improve CoroWrapper: copy also the qualified name on Python 3.4, not only on
Python 3.5+
|
|
|
|
|
|
|
| |
- repr(Task) and repr(CoroWrapper) now also includes where these objects were
created. If the coroutine is not a generator (don't use "yield from"), use
the location of the function, not the location of the coro() wrapper.
- Fix create_task(): truncate the traceback to hide the call to create_task().
|
|
|
|
|
|
|
|
|
|
|
| |
- Tulip issue 185: Add a create_task() method to event loops. 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.
- tests: fix a warning
- fix typo in the name of a test function
- Update AbstractEventLoop: add new event loop methods; update also the unit test
|
|
|
|
|
| |
of a Future with call_soon(). Add an helper, a private method, to set the
result only if the future was not cancelled.
|
|
|
|
|
|
|
|
|
|
| |
* _UnixSubprocessTransport: fix file mode of stdin. Open stdin in write mode,
not in read mode
* Examples: close the event loop at exit
* More reliable CoroWrapper.__del__. If the constructor is interrupted by
KeyboardInterrupt or the coroutine objet is destroyed lately, some the
_source_traceback attribute doesn't exist anymore.
* repr(Task): include also the future the task is waiting for
|
| |
|