[issue46994] Accept explicit contextvars.Context in asyncio create_task() API

2022-03-18 Thread STINNER Victor
STINNER Victor added the comment: Nice enhancement! -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue46994] Accept explicit contextvars.Context in asyncio create_task() API

2022-03-14 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue46994] Accept explicit contextvars.Context in asyncio create_task() API

2022-03-14 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 9523c0d84f351a610dc651b234461eb015fa3b82 by Andrew Svetlov in branch 'main': bpo-46994: Accept explicit contextvars.Context in asyncio create_task() API (GH-31837) https://github.com/python/cpython/commit/9523c0d84f351a610dc651b234461eb015fa3b8

[issue46994] Accept explicit contextvars.Context in asyncio create_task() API

2022-03-13 Thread Yury Selivanov
Yury Selivanov added the comment: Yeah, +1 to add a parameter. Fwiw it was on my idea list when i was working on the pep -- ___ Python tracker ___ ___

[issue46994] Accept explicit contextvars.Context in asyncio create_task() API

2022-03-12 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch pull_requests: +29936 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31837 ___ Python tracker ___ _

[issue46994] Accept explicit contextvars.Context in asyncio create_task() API

2022-03-12 Thread Andrew Svetlov
New submission from Andrew Svetlov : Now asyncio creates a new context copy on task creation. It is the perfect behavior *by default* and should stay as is. However, sometimes passing an explicit context into a task and using back the context modified by task code is desired. The most obviou