Skip to content

UNIXSocket.aclose and _TrioSocketMixin.aclose in cancelled scope does not raise a cancelled error (does not checkpoint) #1288

Description

@graingert

Things to check first

  • I have searched the existing issues and didn't find my bug already reported there

  • I have checked that my bug is still present in the latest release

AnyIO version

a8900c2

Python version

py 3.14

What happened?

    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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions