a backport of asyncio.TaskGroup, asyncio.Runner and asyncio.timeout
This is a backport of the TaskGroup, Runner and timeout code from Python 3.12.8 to Python 3.8, Python 3.9, Python 3.10 and Python 3.11.
This project works by temporarily swapping the current task of a coroutine to a subclass of asyncio.Task with uncancel and context setting support. The advantage of this approach means that most of the operation of asyncio.Task will continue to be c-accelerated.
if sys.python_version >= (3, 11):
from asyncio import run, TaskGroup, timeout
else:
from taskgroup import run, TaskGroup, timeout
async def main():
async with TaskGroup() as group:
group.create_task(task1())
group.create_task(task2())
run(main())
- update note about which version we backported from by @graingert in #27
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in #28
- restore support for 3.8 by @graingert in #30
- @pre-commit-ci made their first contribution in #28
Full Changelog: https://github.com/graingert/taskgroup/compare/0.2.1...0.2.2
- make _Interceptor not abstract by @graingert in #25
Full Changelog: https://github.com/graingert/taskgroup/compare/0.2.0...0.2.1
- add readme and changelog by @graingert in #21
- Add link to PyPI by @graingert in #22
- changes from 3.12.8, add a smoke test, make uncancel installation simpler by @graingert in #23
Full Changelog: https://github.com/graingert/taskgroup/compare/0.1.1...0.2.0
- @pgjones made their first contribution in #18
Full Changelog: https://github.com/graingert/taskgroup/compare/0.1.0...0.1.1
- bump version to 0.1.0 by @graingert in #16
Full Changelog: https://github.com/graingert/taskgroup/compare/0.0.0a6...0.1.0
- configure pre-commit by @graingert in #13
- bump to 0.0.0a5 by @graingert in #14
- bump version by @graingert in #15
Full Changelog: https://github.com/graingert/taskgroup/compare/0.0.0a5...0.0.0a6
- Typehint the public API by @Gobot1234 in #1
- Fix more type issues by @Gobot1234 in #2
- Backport 3.11/12 changes by @Gobot1234 in #3
- Fix support for python 3.9 by @danielnelson in #5
- fix ci by @graingert in #11
- Add publish script by @graingert in #12
Full Changelog: https://github.com/graingert/taskgroup/commits/0.0.0a5