From 56b81f07e58a42edbfa8a02ce6d992ff87a0513f Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 3 Aug 2020 18:42:23 -0400 Subject: [PATCH] Return `Dict[Tuple, Tuple]` from `.get_registry()` --- tractor/_actor.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tractor/_actor.py b/tractor/_actor.py index 5934d7e..a0fb229 100644 --- a/tractor/_actor.py +++ b/tractor/_actor.py @@ -440,7 +440,7 @@ class Actor: f"Cancelling all tasks for {chan} from {chan.uid}") for (channel, cid) in self._rpc_tasks: if channel is chan: - self._cancel_task(cid, channel) + await self._cancel_task(cid, channel) log.debug( f"Msg loop signalled to terminate for" f" {chan} from {chan.uid}") @@ -871,7 +871,11 @@ class Arbiter(Actor): ) -> Dict[str, Tuple[str, str]]: """Return current name registry. """ - return list(self._registry) + # NOTE: requires ``strict_map_key=False`` to the msgpack + # unpacker since we have tuples as keys (not this makes the + # arbiter suscetible to hashdos): + # https://github.com/msgpack/msgpack-python#major-breaking-changes-in-msgpack-10 + return self._registry async def wait_for_actor( self, name: str