#36714: Async signals lose ContextVar state due to use of asyncio.gather
----------------------------------+------------------------------------
Reporter: Mykhailo Havelia | Owner: (none)
Type: Bug | Status: new
Component: HTTP handling | Version: dev
Severity: Normal | Resolution:
Keywords: asyncio, signals | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Comment (by Carlton Gibson):
sync_to_async already propagates the parent context.
[https://github.com/django/asgiref/blob/2138f0317d79cedd065571447ae0a7571989550e/tests/test_sync_contextvars.py#L37-L55
See tests]. Is it not the case that the `asyncio.TaskGroup()` call in
`_gather` needs to take the context parameter? 🤔
I think this is going to be easier to look at in a PR than a series of
comments on the issue here.
--
Ticket URL: <https://code.djangoproject.com/ticket/36714#comment:12>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019a6d5d5b53-b9af695e-91f0-45ba-bc60-502843228c31-000000%40eu-central-1.amazonses.com.