8000 Tweaks to the TaskGroup API (#7255) · python/typeshed@644d554 · GitHub
[go: up one dir, main page]

Skip to content

Commit 644d554

Browse files
authored
Tweaks to the TaskGroup API (#7255)
* 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
1 parent 90bdda8 commit 644d554

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

stdlib/asyncio/taskgroups.pyi

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ from .tasks import Task
99
_T = TypeVar("_T")
1010

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

0 commit comments

Comments
 (0)
0