Skip to main content

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

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

taskgroup-0.2.2.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

taskgroup-0.2.2-py2.py3-none-any.whl (14.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file taskgroup-0.2.2.tar.gz.

File metadata

  • Download URL: taskgroup-0.2.2.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for taskgroup-0.2.2.tar.gz
Algorithm Hash digest
SHA256 078483ac3e78f2e3f973e2edbf6941374fbea81b9c5d0a96f51d297717f4752d
MD5 bcfced2c2ef5493d1f32e0112d0bd00d
BLAKE2b-256 f08de218e0160cc1b692e6e0e5ba34e8865dbb171efeb5fc9a704544b3020605

See more details on using hashes here.

Provenance

The following attestation bundles were made for taskgroup-0.2.2.tar.gz:

Publisher: main.yaml on graingert/taskgroup

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file taskgroup-0.2.2-py2.py3-none-any.whl.

File metadata

  • Download URL: taskgroup-0.2.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for taskgroup-0.2.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e2c53121609f4ae97303e9ea1524304b4de6faf9eb2c9280c7f87976479a52fb
MD5 c9afde7208d2961012666d23167361aa
BLAKE2b-256 d1b174babcc824a57904e919f3af16d86c08b524c0691504baf038ef2d7f655c

See more details on using hashes here.

Provenance

The following attestation bundles were made for taskgroup-0.2.2-py2.py3-none-any.whl:

Publisher: main.yaml on graingert/taskgroup

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page