Skip to content

Commit

Permalink
Tweaks to the TaskGroup API (#7255)
Browse files Browse the repository at this point in the history
* Remove TaskGroup name arg and get_name() method

(We removed those from the implementation.)

* Add optional name arg to create_task()

See python/cpython#31398
  • Loading branch information
gvanrossum authored Feb 18, 2022
1 parent 90bdda8 commit 644d554
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions stdlib/asyncio/taskgroups.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ from .tasks import Task
_T = TypeVar("_T")

class TaskGroup:
def __init__(self, *, name: str | None = ...) -> None: ...
def get_name(self) -> str: ...
def __init__(self) -> None: ...
async def __aenter__(self: Self) -> Self: ...
async def __aexit__(self, et: type[BaseException] | None, exc: BaseException | None, tb: TracebackType | None) -> None: ...
def create_task(self, coro: Generator[Any, None, _T] | Coroutine[Any, Any, _T]) -> Task[_T]: ...
def create_task(self, coro: Generator[Any, None, _T] | Coroutine[Any, Any, _T], *, name: str | None = ...) -> Task[_T]: ...

0 comments on commit 644d554

Please sign in to comment.