UNIXSocket.aclose and _TrioSocketMixin.aclose in cancelled scope does not raise a cancelled error (does not checkpoint)
- Vorherrschende Sprache
- Python
- Sterne
- 2.5k
- Forks
- 260
- Ø Merge
- 2 T. 8 Std.
- Gemergte PRs (30 T.)
- 19
Beschreibung
### 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
a8900c22b58debb7cd43a4c8d94a1905e506a797
### Python version
py 3.14
### What happened?
```py
async def test_aclose_in_cancelled_scope_raises_cancelled_exc(
self, server_sock: socket.socket, socket_path: Path
) -> None:
exc = None
stream = await connect_unix(socket_path)
with CancelScope() as scope:
scope.cancel()
try:
await stream.aclose()
except get_cancelled_exc_class() as e:
exc = e
raise
assert exc is not None
```
failed
### How can we reproduce the bug?
see above
Beitragsleitfaden
Rechercherichtung
Start with the reproduced test test_aclose_in_cancelled_scope_raises_cancelled_exc and inspect UNIXSocket.aclose and _TrioSocketMixin.aclose. Run the test to observe the failure, then verify that closing the stream in an already-cancelled scope raises get_cancelled_exc_class() as expected.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- networking
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 68/100