From 55ec3dbf51c5265b10ab26029bfc0698e2103b07 Mon Sep 17 00:00:00 2001 From: goodboy Date: Fri, 7 Aug 2026 22:24:27 -0400 Subject: [PATCH] Drop unused `_Cache` teardown bindings Remove the unused `value` assignment after cache eviction and skip unpacking stale resource state before raising its invariant error. Review: PR #488 (Copilot) https://github.com/goodboy/tractor/pull/488#pullrequestreview-4850557500 (this patch was generated in some part by `opencode` using `gpt-5.6-sol` (`openai`)) --- tractor/trionics/_mngrs.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tractor/trionics/_mngrs.py b/tractor/trionics/_mngrs.py index c6c400fa..df92f4f7 100644 --- a/tractor/trionics/_mngrs.py +++ b/tractor/trionics/_mngrs.py @@ -255,7 +255,7 @@ class _Cache: try: await no_more_users.wait() finally: - value = cls.values.pop(ctx_key) + cls.values.pop(ctx_key) cls.resources.pop(ctx_key) except Exception as exc: @@ -403,11 +403,6 @@ async def maybe_open_context( resources = _Cache.resources entry: tuple|None = resources.get(ctx_key) if entry: - ( - service_tn, - ev, - ctx_exit, - ) = entry raise RuntimeError( f'Caching resources ALREADY exist?!\n' f'ctx_key={ctx_key!r}\n'