summaryrefslogtreecommitdiffstats
path: root/Modules/_asynciomodule.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-31033: Improve the traceback for cancelled asyncio tasks (GH-19951)Chris Jerdonek2020-05-181-21/+63
| | | | | When an asyncio.Task is cancelled, the exception traceback now starts with where the task was first interrupted. Previously, the traceback only had "depth one."
* bpo-31033: Add a msg argument to Future.cancel() and Task.cancel() (GH-19979)Chris Jerdonek2020-05-151-16/+99
|
* bpo-40559: Add Py_DECREF to _asynciomodule.c:task_step_impl() (GH-19990)Chris Jerdonek2020-05-081-0/+4
| | | | This fixes a possible memory leak in the C implementation of asyncio.Task.
* bpo-40294: Fix _asyncio when module is loaded/unloaded multiple times (GH-19542)Jeffrey Quesnelle2020-04-171-0/+2
|
* bpo-40268: Remove unused structmember.h includes (GH-19530)Victor Stinner2020-04-151-1/+1
| | | | | | If only offsetof() is needed: include stddef.h instead. When structmember.h is used, add a comment explaining that PyMemberDef is used.
* bpo-39947: Add PyThreadState_GetID() function (GH-19163)Victor Stinner2020-03-251-2/+3
| | | | Add PyThreadState_GetID() function: get the unique identifier of a Python thread state.
* bpo-39947: Add _PyThreadState_GetDict() function (GH-19160)Victor Stinner2020-03-251-2/+3
|
* bpo-40024: Update C extension modules to use PyModule_AddType() (GH-19119)Dong-hee Na2020-03-241-12/+3
| | | | | | Update _asyncio, _bz2, _csv, _curses, _datetime, _io, _operator, _pickle, _queue, blake2, multibytecodec and overlapped C extension modules to use PyModule_AddType().
* bpo-39573: Finish converting to new Py_IS_TYPE() macro (GH-18601)Andy Lester2020-03-041-1/+1
|
* bpo-39573: Clean up modules and headers to use Py_IS_TYPE() function (GH-18521)Dong-hee Na2020-02-171-3/+3
|
* bpo-39245: Switch to public API for Vectorcall (GH-18460)Petr Viktorin2020-02-111-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The bulk of this patch was generated automatically with: for name in \ PyObject_Vectorcall \ Py_TPFLAGS_HAVE_VECTORCALL \ PyObject_VectorcallMethod \ PyVectorcall_Function \ PyObject_CallOneArg \ PyObject_CallMethodNoArgs \ PyObject_CallMethodOneArg \ ; do echo $name git grep -lwz _$name | xargs -0 sed -i "s/\b_$name\b/$name/g" done old=_PyObject_FastCallDict new=PyObject_VectorcallDict git grep -lwz $old | xargs -0 sed -i "s/\b$old\b/$new/g" and then cleaned up: - Revert changes to in docs & news - Revert changes to backcompat defines in headers - Nudge misaligned comments
* bpo-39573: Use Py_SET_SIZE() function (GH-18402)Victor Stinner2020-02-071-1/+1
| | | | Replace direct acccess to PyVarObject.ob_size with usage of the Py_SET_SIZE() function.
* Make repr of C accelerated TaskWakeupMethWrapper the same as of pure Python ↵Andrew Svetlov2019-12-071-1/+17
| | | | version (GH-17484)
* bpo-38978: Implement __class_getitem__ for asyncio objects (GH-17491)Batuhan Taşkaya2019-12-071-0/+15
| | | https://bugs.python.org/issue38978
* bpo-38823: Clean up refleaks in _asyncio initialization. (GH-17195)Brandt Bucher2019-11-161-0/+4
| | | https://bugs.python.org/issue38823
* bpo-38785: Prevent asyncio from crashing (GH-17144)Andrew Svetlov2019-11-131-0/+1
| | | | | | | if parent `__init__` is not called from a constructor of object derived from `asyncio.Future` https://bugs.python.org/issue38785
* bpo-36356: Fix memory leak in _asynciomodule.c (GH-16598)Ben Harper2019-10-071-0/+7
|
* bpo-38321: Fix _asynciomodule.c compiler warning (GH-16493)Victor Stinner2019-09-301-1/+0
| | | | | | | | | bpo-38248, bpo-38321: Fix warning: modules\_asynciomodule.c(2667): warning C4102: 'set_exception': unreferenced label The related goto has been removed by commit edad4d89e357c92f70c0324b937845d652b20afd.
* bpo-38248: Fix inconsistent immediate asyncio.Task cancellation (GH-16330)Yury Selivanov2019-09-251-7/+8
|
* bpo-37648: Fixed minor inconsistency in some __contains__. (GH-14904)Serhiy Storchaka2019-08-041-3/+3
| | | | | The collection's item is now always at the left and the needle is on the right of ==.
* bpo-37547: add _PyObject_CallMethodOneArg (GH-14685)Jeroen Demeyer2019-07-111-8/+6
|
* bpo-37337: Add _PyObject_CallMethodNoArgs() (GH-14267)Jeroen Demeyer2019-07-081-9/+7
|
* bpo-37483: add _PyObject_CallOneArg() function (#14558)Jeroen Demeyer2019-07-041-12/+9
|
* bpo-37194: Add a new public PyObject_CallNoArgs() function (GH-13890)Victor Stinner2019-06-171-6/+6
| | | | | | | | | | | | | | | Add a new public PyObject_CallNoArgs() function to the C API: call a callable Python object without any arguments. It is the most efficient way to call a callback without any argument. On x86-64, for example, PyObject_CallFunctionObjArgs(func, NULL) allocates 960 bytes on the stack per call, whereas PyObject_CallNoArgs(func) only allocates 624 bytes per call. It is excluded from stable ABI 3.8. Replace private _PyObject_CallNoArg() with public PyObject_CallNoArgs() in C extensions: _asyncio, _datetime, _elementtree, _pickle, _tkinter and readline.
* bpo-36999: Add asyncio.Task.get_coro() (GH-13680)Alex Grönholm2019-05-301-0/+13
| | | https://bugs.python.org/issue36999
* bpo-32388: Remove cross-version binary compatibility requirement in tp_flags ↵Antoine Pitrou2019-05-291-4/+2
| | | | | | | | (GH-4944) It is now allowed to add new fields at the end of the PyTypeObject struct without having to allocate a dedicated compatibility flag in tp_flags. This will reduce the risk of running out of bits in the 32-bit tp_flags value.
* bpo-36974: implement PEP 590 (GH-13185)Jeroen Demeyer2019-05-291-4/+2
| | | | | Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be> Co-authored-by: Mark Shannon <mark@hotpy.org>
* bpo-32528: Make asyncio.CancelledError a BaseException. (GH-13528)Yury Selivanov2019-05-271-7/+4
| | | | | | | | | | | | | | | This will address the common mistake many asyncio users make: an "except Exception" clause breaking Tasks cancellation. In addition to this change, we stop inheriting asyncio.TimeoutError and asyncio.InvalidStateError from their concurrent.futures.* counterparts. There's no point for these exceptions to share the inheritance chain. In 3.9 we'll focus on implementing supervisors and cancel scopes, which should allow better handling of all exceptions, including SystemExit and KeyboardInterrupt
* asyncio: PendingDeprecationWarning -> DeprecationWarning (GH-12494)Inada Naoki2019-03-221-2/+2
| | | `Task.current_task()` and `Task.all_tasks()` will be removed in 3.9.
* bpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. ↵Zackery Spytz2018-12-171-0/+12
| | | | (GH-11175)
* bpo-33029: Fix signatures of getter and setter functions. (GH-10746)Serhiy Storchaka2018-11-271-16/+16
| | | Fix also return type for few other functions (clear, releasebuffer).
* Fix a compiler warning added in bpo-34872. (GH-9722)Serhiy Storchaka2018-10-051-1/+1
|
* bpo-34872: Fix self-cancellation in C implementation of asyncio.Task (GH-9679)Elvis Pranskevichus2018-10-031-3/+8
| | | | | | | | | | | | | | | | | The C implementation of asyncio.Task currently fails to perform the cancellation cleanup correctly in the following scenario. async def task1(): async def task2(): await task3 # task3 is never cancelled asyncio.current_task().cancel() await asyncio.create_task(task2()) The actuall error is a hardcoded call to `future_cancel()` instead of calling the `cancel()` method of a future-like object. Thanks to Vladimir Matveev for noticing the code discrepancy and to Yury Selivanov for coming up with a pathological scenario.
* bpo-34762: Update PyContext* to PyObject* in asyncio and decimal (GH-9609)Yury Selivanov2018-09-271-9/+8
| | | This fixes various compiler warnings.
* bpo-34755: Add few minor optimizations in _asynciomodule.c. (GH-9455)Serhiy Storchaka2018-09-211-158/+116
|
* bpo-34622: Extract asyncio exceptions into a separate module (GH-9141)Andrew Svetlov2018-09-111-0/+2
|
* Fixed inconsistency in string handling in the Task C implementation (GH-8717)Alex Grönholm2018-08-091-5/+9
|
* bpo-34270: Make it possible to name asyncio tasks (GH-8547)Alex Grönholm2018-08-081-2/+58
| | | Co-authored-by: Antti Haapala <antti.haapala@anttipatterns.com>
* Make TaskStepMethWrapper_Type and TaskWakeupMethWrapper_Type static. (GH-8127)Benjamin Peterson2018-07-061-2/+2
|
* bpo-32610: Fix asyncio.all_tasks() to return only pending tasks. (GH-7174)Yury Selivanov2018-05-281-2/+2
|
* bpo-33623: Fix possible SIGSGV when asyncio.Future is created in __del__ (#7080)Yury Selivanov2018-05-281-1/+7
|
* bpo-33584: Fix several minor bugs in asyncio. (GH-7003)Serhiy Storchaka2018-05-201-15/+21
| | | | | | | | | | | | Fix the following bugs in the C implementation: * get_future_loop() silenced all exceptions raised when look up the get_loop attribute, not just an AttributeError. * enter_task() silenced all exceptions raised when look up the current task, not just a KeyError. * repr() was called for a borrowed link in enter_task() and task_step_impl(). * str() was used instead of repr() in formatting one error message (in Python implementation too). * There where few reference leaks in error cases.
* bpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995)Oren Milman2018-02-131-9/+19
|
* bpo-32746: Fix multiple typos (GH-5144)Leo Arias2018-02-041-1/+1
| | | Fix typos found by codespell in docs, docstrings, and comments.
* bpo-32643: Drop support for a few private Task and Future APIs. (#5293)Yury Selivanov2018-01-241-106/+9
| | | | | | | | Specifically, it's not possible to subclass Task/Future classes and override the following methods: * Future._schedule_callbacks * Task._step * Task._wakeup
* bpo-32296: Make get_running_loop() another 4-5x faster (#5277)Yury Selivanov2018-01-231-62/+102
|
* bpo-32436: Implement PEP 567 (#5027)Yury Selivanov2018-01-231-55/+154
|
* Fix typo (#5049)Andrew Svetlov2017-12-301-1/+1
|
* bpo-31721: Allow Future._log_traceback to only be set to False (#5009)Yury Selivanov2017-12-251-0/+5
|
* bpo-32363: Disable Task.set_exception() and Task.set_result() (#4923)Yury Selivanov2017-12-251-9/+42
|