avoid format on the hot send path

wkt/start_or_cancel_tests_474
mahmoud 2026-05-05 18:37:19 +00:00 committed by goodboy
parent 83b3488455
commit 148a098ca6
2 changed files with 8 additions and 8 deletions

View File

@ -326,8 +326,8 @@ class Channel:
__tracebackhide__: bool = hide_tb
try:
log.transport(
'=> send IPC msg:\n\n'
f'{pformat(payload)}\n'
'=> send IPC msg\n\n'
# f'{pformat(payload)}\n'
)
# assert self._transport # but why typing?
await self._transport.send(

View File

@ -308,12 +308,12 @@ class PldRx(Struct):
pld: PayloadT = self._pld_dec.decode(pld)
log.runtime(
f'Decoded payload for\n'
# f'\n'
f'{msg}\n'
# ^TODO?, ideally just render with `,
# pld={decode}` in the `msg.pformat()`??
f'where, '
f'{type(msg).__name__}.pld={pld!r}\n'
# # f'\n'
# f'{msg}\n'
# # ^TODO?, ideally just render with `,
# # pld={decode}` in the `msg.pformat()`??
# f'where, '
# f'{type(msg).__name__}.pld={pld!r}\n'
)
return pld
except TypeError as typerr: