From 725c4ef2126c8c214106bb5d002a271d1ca29a7f Mon Sep 17 00:00:00 2001 From: goodboy Date: Thu, 25 Jun 2026 17:32:54 -0400 Subject: [PATCH] Use `.cancel_called` over deprecated `ActorNursery.cancelled` `tests.test_cancellation` asserted on `ActorNursery.cancelled`, which now warns + redirects to `.cancel_called`. Swap to the non-deprecated property so the suite stops tripping its own `DeprecationWarning`. (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code --- tests/test_cancellation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_cancellation.py b/tests/test_cancellation.py index 5566691a..c3644d88 100644 --- a/tests/test_cancellation.py +++ b/tests/test_cancellation.py @@ -351,7 +351,7 @@ async def test_cancel_infinite_streamer( # we support trio's cancellation system assert cancel_scope.cancelled_caught - assert n.cancelled + assert n.cancel_called @pytest.mark.parametrize( @@ -465,7 +465,7 @@ async def test_some_cancels_all( elif isinstance(err, tractor.RemoteActorError): assert err.boxed_type == err_type - assert an.cancelled is True + assert an.cancel_called is True assert not an._children else: pytest.fail("Should have gotten a remote assertion error?")