Use `.aid` fields over deprecated `.uid` in core

`tractor`'s own `Channel.uid`/`Actor.uid` now warn + redirect to
the `.aid: msg.Aid` struct, yet the runtime kept calling the
deprecated tuple property internally — tripping its own
`DeprecationWarning` across many tests.

Swap each internal `.uid` for the behavior-preserving
`(x.aid.name, x.aid.uuid)` (and `.uid[0]` -> `.aid.name`) so the
emitted value / log output stays byte-identical, just sourced
from the non-deprecated struct. Touches `msg._ops`,
`_streaming`, `_exceptions`, `devx.debug._sync`,
`experimental._pubsub`.

(this patch was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
wkt/rm_test_warnings
Gud Boi 2026-06-25 17:37:29 -04:00
parent 725c4ef212
commit 727aee0f84
5 changed files with 11 additions and 11 deletions

View File

@ -1223,7 +1223,7 @@ def pack_error(
str,
str | tuple[str, str]
] = {}
our_uid: tuple = current_actor().uid
our_uid: tuple = (current_actor().aid.name, current_actor().aid.uuid)
if (
isinstance(exc, RemoteActorError)

View File

@ -418,7 +418,7 @@ class MsgStream(trio.abc.Channel):
# it can't traverse the transport.
log.warning(
f'Stream was already destroyed?\n'
f'actor: {ctx.chan.uid}\n'
f'actor: {(ctx.chan.aid.name, ctx.chan.aid.uuid)}\n'
f'ctx id: {ctx.cid}'
)
drained.append(re)
@ -700,7 +700,7 @@ async def open_stream_from_ctx(
task: str = trio.lowlevel.current_task().name
raise RuntimeError(
'Stream opened after `Context.cancel()` called..?\n'
f'task: {actor.uid[0]}:{task}\n'
f'task: {actor.aid.name}:{task}\n'
f'{ctx}'
)
@ -823,7 +823,7 @@ async def open_stream_from_ctx(
except KeyError:
log.warning(
f'Stream was already destroyed?\n'
f'actor: {ctx.chan.uid}\n'
f'actor: {(ctx.chan.aid.name, ctx.chan.aid.uuid)}\n'
f'ctx id: {ctx.cid}'
)

View File

@ -92,11 +92,11 @@ async def maybe_wait_for_debugger(
# tearing down.
ctx_in_debug: Context|None = Lock.ctx_in_debug
in_debug: tuple[str, str]|None = (
ctx_in_debug.chan.uid
(ctx_in_debug.chan.aid.name, ctx_in_debug.chan.aid.uuid)
if ctx_in_debug
else None
)
if in_debug == current_actor().uid:
if in_debug == (current_actor().aid.name, current_actor().aid.uuid):
log.debug(
msg
+

View File

@ -117,7 +117,7 @@ def modify_subs(
Effectively a symbol subscription api.
"""
log.info(f"{ctx.chan.uid} changed subscription to {topics}")
log.info(f"{(ctx.chan.aid.name, ctx.chan.aid.uuid)} changed subscription to {topics}")
# update map from each symbol to requesting client's chan
for topic in topics:

View File

@ -345,9 +345,9 @@ class PldRx(Struct):
exc=mte,
cid=msg.cid,
src_uid=(
ipc.chan.uid
(ipc.chan.aid.name, ipc.chan.aid.uuid)
if not is_started_send_side
else ipc._actor.uid
else (ipc._actor.aid.name, ipc._actor.aid.uuid)
),
)
mte._ipc_msg = err_msg
@ -711,7 +711,7 @@ async def drain_to_final_msg(
'Cancelling `MsgStream` drain since '
f'{reason}\n'
f'\n'
f'<= {ctx.chan.uid}\n'
f'<= {(ctx.chan.aid.name, ctx.chan.aid.uuid)}\n'
f' |_{ctx._nsf}()\n'
f'\n'
f'=> {ctx._task}\n'
@ -726,7 +726,7 @@ async def drain_to_final_msg(
else:
report: str = (
'Ignoring "yield" msg during `ctx.result()` drain..\n'
f'<= {ctx.chan.uid}\n'
f'<= {(ctx.chan.aid.name, ctx.chan.aid.uuid)}\n'
f' |_{ctx._nsf}()\n\n'
f'=> {ctx._task}\n'
f' |_{ctx._stream}\n\n'