Compare commits

..

No commits in common. "c648885eed87c71e20c4ed6a78e293599923a972" and "e1bacaf4f4223d40e9b6869fdc9138ac0773f6f9" have entirely different histories.

4 changed files with 6 additions and 27 deletions

View File

@ -25,7 +25,7 @@ async def bp_then_error(
) -> None:
# sync with `trio`-side (caller) task
# sync with ``trio``-side (caller) task
to_trio.send_nowait('start')
# NOTE: what happens here inside the hook needs some refinement..
@ -33,7 +33,8 @@ async def bp_then_error(
# we set `Lock.local_task_in_debug = 'sync'`, we probably want
# some further, at least, meta-data about the task/actor in debug
# in terms of making it clear it's `asyncio` mucking about.
breakpoint() # asyncio-side
breakpoint()
# short checkpoint / delay
await asyncio.sleep(0.5) # asyncio-side
@ -57,6 +58,7 @@ async def trio_ctx(
# this will block until the ``asyncio`` task sends a "first"
# message, see first line in above func.
async with (
to_asyncio.open_channel_from(
bp_then_error,
# raise_after_bp=not bp_before_started,
@ -67,7 +69,7 @@ async def trio_ctx(
assert first == 'start'
if bp_before_started:
await tractor.pause() # trio-side
await tractor.pause()
await ctx.started(first) # trio-side
@ -109,7 +111,7 @@ async def main(
# pause in parent to ensure no cross-actor
# locking problems exist!
await tractor.pause() # trio-root
await tractor.pause()
if cancel_from_root:
await ctx.cancel()

View File

@ -99,14 +99,6 @@ def ctlc(
'https://github.com/goodboy/tractor/issues/320'
)
if mark.name == 'ctlcs_bish':
pytest.skip(
f'Test {node} prolly uses something from the stdlib (namely `asyncio`..)\n'
f'The test and/or underlying example script can *sometimes* run fine '
f'locally but more then likely until the cpython peeps get their sh#$ together, '
f'this test will definitely not behave like `trio` under SIGINT..\n'
)
if use_ctlc:
# XXX: disable pygments highlighting for auto-tests
# since some envs (like actions CI) will struggle

View File

@ -22,7 +22,6 @@ from __future__ import annotations
import builtins
import importlib
from pprint import pformat
from pdb import bdb
import sys
from types import (
TracebackType,
@ -182,7 +181,6 @@ def get_err_type(type_name: str) -> BaseException|None:
builtins,
_this_mod,
trio,
bdb,
]:
if type_ref := getattr(
ns,

View File

@ -258,9 +258,6 @@ class PldRx(Struct):
f'|_pld={pld!r}\n'
)
return pld
except TypeError as typerr:
__tracebackhide__: bool = False
raise typerr
# XXX pld-value type failure
except ValidationError as valerr:
@ -802,11 +799,6 @@ def validate_payload_msg(
roundtripped: Started|None = None
try:
roundtripped: Started = codec.decode(msg_bytes)
except TypeError as typerr:
__tracebackhide__: bool = False
raise typerr
try:
ctx: Context = getattr(ipc, 'ctx', ipc)
pld: PayloadT = ctx.pld_rx.decode_pld(
msg=roundtripped,
@ -831,11 +823,6 @@ def validate_payload_msg(
)
raise ValidationError(complaint)
# usually due to `.decode()` input type
except TypeError as typerr:
__tracebackhide__: bool = False
raise typerr
# raise any msg type error NO MATTER WHAT!
except ValidationError as verr:
try: