`TaskGroup.__aexit__` visits a cancel point on asyncio
- Lingua principale
- Python
- Stelle
- 2.5k
- Fork
- 260
- Merge medio
- 1g 8h
- PR unite (30g)
- 17
Descrizione
### Things to check first
- [x] I have searched the existing issues and didn't find my bug already reported there
- [x] I have checked that my bug is still present in the latest release
### AnyIO version
main (a2a07c7c7af5d0f154b770f280d8772299a20a38)
### Python version
CPython 3.10.19, 3.11.14, 3.12.12, 3.13.11, 3.14.2
### What happened?
In a cancelled scope, or with a pending native cancellation, `TaskGroup` on asyncio injects a cancellation exception even when no child exited with a cancellation exception. This violates Trio's cancellation safety semantics: see https://github.com/python-trio/trio/blob/b0732873e851b6c6f75d5b819ea4f8a063029f52/newsfragments/1457.feature.rst and https://github.com/python-trio/trio/commit/451393acec35c3a01cba0c19de6bf8f6f23dbc7b.
### How can we reproduce the bug?
f637fb6c93cf625b9615c260767e5e21b231e381
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.