backport of asyncio.TaskGroup, asyncio.Runner and asyncio.timeout
Project description
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
- update note about which version we backported from by @graingert in https://github.com/graingert/taskgroup/pull/27
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/graingert/taskgroup/pull/28
- restore support for 3.8 by @graingert in https://github.com/graingert/taskgroup/pull/30
New Contributors
- @pre-commit-ci made their first contribution in https://github.com/graingert/taskgroup/pull/28
Full Changelog: https://github.com/graingert/taskgroup/compare/0.2.1...0.2.2
0.2.1
What's Changed
- make _Interceptor not abstract by @graingert in https://github.com/graingert/taskgroup/pull/25
Full Changelog: https://github.com/graingert/taskgroup/compare/0.2.0...0.2.1
0.2.0
What's Changed
- add readme and changelog by @graingert in https://github.com/graingert/taskgroup/pull/21
- Add link to PyPI by @graingert in https://github.com/graingert/taskgroup/pull/22
- changes from 3.12.8, add a smoke test, make uncancel installation simpler by @graingert in https://github.com/graingert/taskgroup/pull/23
Full Changelog: https://github.com/graingert/taskgroup/compare/0.1.1...0.2.0
0.1.1
What's Changed
- Alter typing to support Python3.9 by @pgjones in https://github.com/graingert/taskgroup/pull/18
- bump to 0.1.1 by @graingert in https://github.com/graingert/taskgroup/pull/19
New Contributors
- @pgjones made their first contribution in https://github.com/graingert/taskgroup/pull/18
Full Changelog: https://github.com/graingert/taskgroup/compare/0.1.0...0.1.1
0.1.0
What's Changed
- bump version to 0.1.0 by @graingert in https://github.com/graingert/taskgroup/pull/16
Full Changelog: https://github.com/graingert/taskgroup/compare/0.0.0a6...0.1.0
0.0.0a6
What's Changed
- configure pre-commit by @graingert in https://github.com/graingert/taskgroup/pull/13
- bump to 0.0.0a5 by @graingert in https://github.com/graingert/taskgroup/pull/14
- bump version by @graingert in https://github.com/graingert/taskgroup/pull/15
Full Changelog: https://github.com/graingert/taskgroup/compare/0.0.0a5...0.0.0a6
0.0.0a5
What's Changed
- Typehint the public API by @Gobot1234 in https://github.com/graingert/taskgroup/pull/1
- Fix more type issues by @Gobot1234 in https://github.com/graingert/taskgroup/pull/2
- Backport 3.11/12 changes by @Gobot1234 in https://github.com/graingert/taskgroup/pull/3
- Fix support for python 3.9 by @danielnelson in https://github.com/graingert/taskgroup/pull/5
- fix ci by @graingert in https://github.com/graingert/taskgroup/pull/11
- Add publish script by @graingert in https://github.com/graingert/taskgroup/pull/12
New Contributors
- @Gobot1234 made their first contribution in https://github.com/graingert/taskgroup/pull/1
- @danielnelson made their first contribution in https://github.com/graingert/taskgroup/pull/5
Full Changelog: https://github.com/graingert/taskgroup/commits/0.0.0a5
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
078483ac3e78f2e3f973e2edbf6941374fbea81b9c5d0a96f51d297717f4752d
|
|
| MD5 |
bcfced2c2ef5493d1f32e0112d0bd00d
|
|
| BLAKE2b-256 |
f08de218e0160cc1b692e6e0e5ba34e8865dbb171efeb5fc9a704544b3020605
|
Provenance
The following attestation bundles were made for taskgroup-0.2.2.tar.gz:
Publisher:
main.yaml on graingert/taskgroup
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
taskgroup-0.2.2.tar.gz -
Subject digest:
078483ac3e78f2e3f973e2edbf6941374fbea81b9c5d0a96f51d297717f4752d - Sigstore transparency entry: 159247960
- Sigstore integration time:
-
Permalink:
graingert/taskgroup@978bbff600a12d17b3d42ad533f9dbeeb103ed90 -
Branch / Tag:
refs/tags/0.2.2 - Owner: https://github.com/graingert
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yaml@978bbff600a12d17b3d42ad533f9dbeeb103ed90 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2c53121609f4ae97303e9ea1524304b4de6faf9eb2c9280c7f87976479a52fb
|
|
| MD5 |
c9afde7208d2961012666d23167361aa
|
|
| BLAKE2b-256 |
d1b174babcc824a57904e919f3af16d86c08b524c0691504baf038ef2d7f655c
|
Provenance
The following attestation bundles were made for taskgroup-0.2.2-py2.py3-none-any.whl:
Publisher:
main.yaml on graingert/taskgroup
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
taskgroup-0.2.2-py2.py3-none-any.whl -
Subject digest:
e2c53121609f4ae97303e9ea1524304b4de6faf9eb2c9280c7f87976479a52fb - Sigstore transparency entry: 159247964
- Sigstore integration time:
-
Permalink:
graingert/taskgroup@978bbff600a12d17b3d42ad533f9dbeeb103ed90 -
Branch / Tag:
refs/tags/0.2.2 - Owner: https://github.com/graingert
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yaml@978bbff600a12d17b3d42ad533f9dbeeb103ed90 -
Trigger Event:
push
-
Statement type: