taskgroup 0.2.2


pip install taskgroup

  Latest version

Released: Jan 03, 2025

Project Links

Meta
Author: Thomas Grainger

Classifiers

License
  • OSI Approved :: MIT License

PyPI - Version

taskgroup

a backport of asyncio.TaskGroup, asyncio.Runner and asyncio.timeout

background

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.

operation

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.

example

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())

changelog

0.2.2

What's Changed

New Contributors

Full Changelog: https://github.com/graingert/taskgroup/compare/0.2.1...0.2.2

0.2.1

What's Changed

Full Changelog: https://github.com/graingert/taskgroup/compare/0.2.0...0.2.1

0.2.0

What's Changed

Full Changelog: https://github.com/graingert/taskgroup/compare/0.1.1...0.2.0

0.1.1

What's Changed

New Contributors

Full Changelog: https://github.com/graingert/taskgroup/compare/0.1.0...0.1.1

0.1.0

What's Changed

Full Changelog: https://github.com/graingert/taskgroup/compare/0.0.0a6...0.1.0

0.0.0a6

What's Changed

Full Changelog: https://github.com/graingert/taskgroup/compare/0.0.0a5...0.0.0a6

0.0.0a5

What's Changed

New Contributors

Full Changelog: https://github.com/graingert/taskgroup/commits/0.0.0a5

Wheel compatibility matrix

Platform Python 2 Python 3
any

Files in release

Extras: None
Dependencies:
exceptiongroup
typing_extensions (<5,>=4.12.2)