Drop test-local timeouts, +`sync_pause` to dev

In `pyproject.toml`,
- include the `sync_pause` group from `dev`, so dev
  installs ship `greenback` for `pause_from_sync()`.

Comment out per-test `@pytest.mark.timeout(...)`
markers in,
- `tests/devx/test_debugger.py`
- `tests/discovery/test_registrar.py`
- `tests/spawn/test_main_thread_forkserver.py`
- `tests/spawn/test_subint_cancellation.py`
- `tests/test_advanced_streaming.py`
- `tests/test_cancellation.py`

The global cap was already dropped (3c366cac); these
were the leftover per-test caps which now block
interactive `pdb` flows under the new spawn backends.

In `uv.lock`,
- pull `greenback` into the resolved `dev` deps
  (per the `sync_pause` include above).
- catch up the prior `xonsh` editable→PyPI switch
  (from the `pyproject.toml` `tool.uv.sources` edit).

(this commit msg was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code

(cherry picked from commit b7115fc875)
(factored: dropped spawn-backend-only paths under tests/spawn/)
trionics_start_or_cancel
Gud Boi 2026-06-09 20:23:26 -04:00
parent d4eac06de2
commit 5d37acb5b8
6 changed files with 23 additions and 26 deletions

View File

@ -61,6 +61,7 @@ dev = [
{include-group = 'devx'}, {include-group = 'devx'},
{include-group = 'testing'}, {include-group = 'testing'},
{include-group = 'repl'}, {include-group = 'repl'},
{include-group = 'sync_pause'},
] ]
devx = [ devx = [
# `tractor.devx` tooling # `tractor.devx` tooling

View File

@ -4,6 +4,7 @@
''' '''
from __future__ import annotations from __future__ import annotations
import platform import platform
import os
import signal import signal
import time import time
from typing import ( from typing import (
@ -90,7 +91,6 @@ def spawn(
https://docs.python.org/3/using/cmdline.html#using-on-controlling-color https://docs.python.org/3/using/cmdline.html#using-on-controlling-color
''' '''
import os
# disable colored tbs # disable colored tbs
os.environ['PYTHON_COLORS'] = '0' os.environ['PYTHON_COLORS'] = '0'
# disable all ANSI color output # disable all ANSI color output
@ -104,7 +104,6 @@ def spawn(
without requiring per-script CLI plumbing. without requiring per-script CLI plumbing.
''' '''
import os
os.environ['TRACTOR_SPAWN_METHOD'] = start_method os.environ['TRACTOR_SPAWN_METHOD'] = start_method
def set_loglevel(): def set_loglevel():
@ -116,7 +115,6 @@ def spawn(
the test harness without per-script edits. the test harness without per-script edits.
''' '''
import os
if loglevel: if loglevel:
os.environ['TRACTOR_LOGLEVEL'] = loglevel os.environ['TRACTOR_LOGLEVEL'] = loglevel
else: else:
@ -176,13 +174,11 @@ def spawn(
if ptyproc.isalive(): if ptyproc.isalive():
ptyproc.kill(signal.SIGKILL) ptyproc.kill(signal.SIGKILL)
# Scope our env-var mutations to this single fixture # Scope our env-var mutations to this single fixture invocation
# invocation — both `TRACTOR_SPAWN_METHOD` and # — both `TRACTOR_SPAWN_METHOD` and `TRACTOR_LOGLEVEL` are
# `TRACTOR_LOGLEVEL` are honored by # honored by `tractor._root.open_root_actor()` so leaking them
# `tractor._root.open_root_actor()` so leaking them past # past this test could inadvertently re-route a later in-process
# this test could inadvertently re-route a later # tractor test's spawn-backend / loglevel.
# in-process tractor test's spawn-backend / loglevel.
import os
os.environ.pop('TRACTOR_SPAWN_METHOD', None) os.environ.pop('TRACTOR_SPAWN_METHOD', None)
os.environ.pop('TRACTOR_LOGLEVEL', None) os.environ.pop('TRACTOR_LOGLEVEL', None)

View File

@ -841,7 +841,7 @@ def test_multi_nested_subactors_error_through_nurseries(
) )
@pytest.mark.timeout(15) # @pytest.mark.timeout(15)
@has_nested_actors @has_nested_actors
def test_root_nursery_cancels_before_child_releases_tty_lock( def test_root_nursery_cancels_before_child_releases_tty_lock(
spawn, spawn,

View File

@ -535,13 +535,13 @@ async def kill_transport(
# At timeout the plugin hard-kills the pytest process — that's # At timeout the plugin hard-kills the pytest process — that's
# the intended behavior here; the alternative is an unattended # the intended behavior here; the alternative is an unattended
# suite run that never returns. # suite run that never returns.
@pytest.mark.timeout( # @pytest.mark.timeout(
30, # 30,
# NOTE should be a 2.1s happy path. # # NOTE should be a 2.1s happy path.
# XXX for `main_thread_forkserver` this is SUPER SENSITIVE # # XXX for `main_thread_forkserver` this is SUPER SENSITIVE
# so keep it higher to avoid flaky runs.. # # so keep it higher to avoid flaky runs..
method='thread', # method='thread',
) # )
@pytest.mark.skipon_spawn_backend( @pytest.mark.skipon_spawn_backend(
'subint', 'subint',
# 'main_thread_forkserver', # 'main_thread_forkserver',

View File

@ -430,10 +430,10 @@ async def inf_streamer(
print('streamer exited .open_streamer() block') print('streamer exited .open_streamer() block')
@pytest.mark.timeout( # @pytest.mark.timeout(
6, # 6,
method='signal', # method='signal',
) # )
def test_local_task_fanout_from_stream( def test_local_task_fanout_from_stream(
reg_addr: tuple, reg_addr: tuple,
debug_mode: bool, debug_mode: bool,

View File

@ -458,10 +458,10 @@ async def spawn_and_error(
# `test_nested_multierrors`. See # `test_nested_multierrors`. See
# `ai/conc-anal/subint_forkserver_test_cancellation_leak_issue.md` # `ai/conc-anal/subint_forkserver_test_cancellation_leak_issue.md`
# / #449 for the post-mortem. # / #449 for the post-mortem.
@pytest.mark.timeout( # @pytest.mark.timeout(
10, # 10,
method='thread', # method='thread',
) # )
@tractor_test @tractor_test
async def test_nested_multierrors( async def test_nested_multierrors(
reg_addr: tuple, reg_addr: tuple,