[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-25 Thread Yves Duprat
Change by Yves Duprat : -- nosy: +yduprat ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-24 Thread Tin Tvrtković
Change by Tin Tvrtković : -- pull_requests: +29682 pull_request: https://github.com/python/cpython/pull/31559 ___ Python tracker ___

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-23 Thread Tin Tvrtković
Change by Tin Tvrtković : -- nosy: +tinchester nosy_count: 6.0 -> 7.0 pull_requests: +29664 pull_request: https://github.com/python/cpython/pull/31513 ___ Python tracker ___ ___

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-20 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset e7130c2e8c6abfaf04b209bd5b239059eda024b9 by Andrew Svetlov in branch 'main': bpo-46752: Uniform TaskGroup.__repr__ (GH-31409) https://github.com/python/cpython/commit/e7130c2e8c6abfaf04b209bd5b239059eda024b9 -- ___

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-18 Thread Guido van Rossum
Change by Guido van Rossum : -- pull_requests: +29551 pull_request: https://github.com/python/cpython/pull/31411 ___ Python tracker ___

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-18 Thread Andrew Svetlov
Change by Andrew Svetlov : -- pull_requests: +29550 pull_request: https://github.com/python/cpython/pull/31409 ___ Python tracker ___ __

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-17 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset d85121660ea50bbe8fbd31797aa6e4afe0850388 by Guido van Rossum in branch 'main': bpo-46752: Slight improvements to TaskGroup API (GH-31398) https://github.com/python/cpython/commit/d85121660ea50bbe8fbd31797aa6e4afe0850388 -- _

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-17 Thread Guido van Rossum
Change by Guido van Rossum : -- pull_requests: +29541 pull_request: https://github.com/python/cpython/pull/31398 ___ Python tracker ___

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-16 Thread Guido van Rossum
Guido van Rossum added the comment: I have a PR up to typeshed to add the new Task methods and a new stub file taskgroups.pyi: https://github.com/python/typeshed/pull/7240 -- ___ Python tracker

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-16 Thread Yury Selivanov
Yury Selivanov added the comment: > There's one thing that gather() does that TaskGroup doesn't: it gives us the > return values from the tasks. That's easy to do with task groups too: async with TaskGroup() as g: r1 = g.create_task(coro1()) r2 = g.create_task(coro2()) print

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-16 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +dhalbert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-16 Thread Guido van Rossum
Guido van Rossum added the comment: I've created a separate issue for cancel scopes: bpo-46771. -- ___ Python tracker ___ ___ Pytho

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-16 Thread Guido van Rossum
Guido van Rossum added the comment: @dhalbert, it's probably better to file a new issue if you want changes to gather(). Although I suppose that if we want to deemphasize it, we shouldn't be adding new features to it. My own new feature idea would be to have it wait for all tasks and then if

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-16 Thread Dan Halbert
Dan Halbert added the comment: For your TODO list (not sure how else to communicate this): I agree with the de-emphasis of gather(). I think adding another version of gather() that cancels all the remaining tasks if one fails would also be good, unless you think it is completely redundant du

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-15 Thread Guido van Rossum
Guido van Rossum added the comment: Remaining TODO list: - Add a test showing the need for the .uncancel() call in __aexit__() (currently on line 97). Dropping that line does not cause any tests to fail. - Ensure the taskgroup tests are run with the C and Python Task implementations. - R

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-15 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 602630ac1855e38ef06361c68f6e216375a06180 by Guido van Rossum in branch 'main': bpo-46752: Add TaskGroup; add Task..cancelled(),.uncancel() (GH-31270) https://github.com/python/cpython/commit/602630ac1855e38ef06361c68f6e216375a06180 -

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-14 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +njs ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-14 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +patch pull_requests: +29493 pull_request: https://github.com/python/cpython/pull/31270 ___ Python tracker ___ ___

[issue46752] Introduce task groups to asyncio and change task cancellation semantics

2022-02-14 Thread Guido van Rossum
New submission from Guido van Rossum : After some conversations with Yury, and encouraged by the SC's approval of PEP 654, I am proposing to add a new class, asyncio.TaskGroup, which introduces structured concurrency similar to nurseries in Trio. I started with EdgeDb's TaskGroup implementati