Various adjustments to fix breakage after rebase

- Remove `exceptiongroup` import,
- pin to py 3.11 in `setup.py`
- revert any lingering `tractor.devx` imports; sub-pkg is coming in
  a downstream PR!
- remove weird double `@property` lingering from conflict reso..
- modern `pytest` requires conftest mod mods to be  relative imported.
sc_super_proto_dgrams
Tyler Goodlet 2025-03-18 20:55:21 -04:00
parent 9a8cd13894
commit 11bab13a06
7 changed files with 12 additions and 20 deletions

View File

@ -75,7 +75,7 @@ setup(
], ],
tests_require=['pytest'], tests_require=['pytest'],
python_requires=">=3.10", python_requires=">=3.11",
keywords=[ keywords=[
'trio', 'trio',
'async', 'async',

View File

@ -26,7 +26,7 @@ from pexpect.exceptions import (
from tractor._testing import ( from tractor._testing import (
examples_dir, examples_dir,
) )
from conftest import ( from .conftest import (
_ci_env, _ci_env,
) )

View File

@ -10,7 +10,7 @@ import tractor
from tractor._testing import ( from tractor._testing import (
tractor_test, tractor_test,
) )
from conftest import ( from .conftest import (
sig_prog, sig_prog,
_INT_SIGNAL, _INT_SIGNAL,
_INT_RETURN_CODE, _INT_RETURN_CODE,

View File

@ -18,8 +18,6 @@
tractor: structured concurrent ``trio``-"actors". tractor: structured concurrent ``trio``-"actors".
""" """
from exceptiongroup import BaseExceptionGroup
from ._clustering import open_actor_cluster from ._clustering import open_actor_cluster
from ._ipc import Channel from ._ipc import Channel
from ._context import ( from ._context import (

View File

@ -313,7 +313,7 @@ async def _drain_to_final_msg(
log.critical('SHOULD NEVER GET HERE!?') log.critical('SHOULD NEVER GET HERE!?')
assert msg is ctx._cancel_msg assert msg is ctx._cancel_msg
assert error.msgdata == ctx._remote_error.msgdata assert error.msgdata == ctx._remote_error.msgdata
from .devx._debug import pause from ._debug import pause
await pause() await pause()
ctx._maybe_cancel_and_set_remote_error(error) ctx._maybe_cancel_and_set_remote_error(error)
ctx._maybe_raise_remote_err(error) ctx._maybe_raise_remote_err(error)
@ -2199,12 +2199,12 @@ async def open_context_from_portal(
# pass # pass
# TODO: factor ^ into below for non-root cases? # TODO: factor ^ into below for non-root cases?
# #
from .devx import maybe_wait_for_debugger from ._debug import maybe_wait_for_debugger
was_acquired: bool = await maybe_wait_for_debugger( was_acquired: bool = await maybe_wait_for_debugger(
header_msg=( # header_msg=(
'Delaying `ctx.cancel()` until debug lock ' # 'Delaying `ctx.cancel()` until debug lock '
'acquired..\n' # 'acquired..\n'
), # ),
) )
if was_acquired: if was_acquired:
log.pdb( log.pdb(
@ -2310,7 +2310,7 @@ async def open_context_from_portal(
# where the root is waiting on the lock to clear but the # where the root is waiting on the lock to clear but the
# child has already cleared it and clobbered IPC. # child has already cleared it and clobbered IPC.
if debug_mode(): if debug_mode():
from .devx import maybe_wait_for_debugger from ._debug import maybe_wait_for_debugger
await maybe_wait_for_debugger() await maybe_wait_for_debugger()
# though it should be impossible for any tasks # though it should be impossible for any tasks

View File

@ -55,15 +55,10 @@ from ._exceptions import (
unpack_error, unpack_error,
TransportClosed, TransportClosed,
) )
from .devx import ( from . import _debug
# pause,
maybe_wait_for_debugger,
_debug,
)
from . import _state from . import _state
from .log import get_logger from .log import get_logger
if TYPE_CHECKING: if TYPE_CHECKING:
from ._runtime import Actor from ._runtime import Actor
@ -651,7 +646,7 @@ async def _invoke(
# don't pop the local context until we know the # don't pop the local context until we know the
# associated child isn't in debug any more # associated child isn't in debug any more
await maybe_wait_for_debugger() await _debug.maybe_wait_for_debugger()
ctx: Context = actor._contexts.pop(( ctx: Context = actor._contexts.pop((
chan.uid, chan.uid,
cid, cid,

View File

@ -1318,7 +1318,6 @@ class Actor:
log.runtime("Shutting down channel server") log.runtime("Shutting down channel server")
self._server_n.cancel_scope.cancel() self._server_n.cancel_scope.cancel()
@property
@property @property
def accept_addr(self) -> tuple[str, int]: def accept_addr(self) -> tuple[str, int]:
''' '''