diff --git a/CHANGES b/CHANGES index f3d3af18..0d896656 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,27 @@ _Notes on upcoming releases will be added here_ +### Development + +**The test suite can see deprecation warnings again** + +`filterwarnings` silenced `DeprecationWarning` for `libtmux.*`, +`libtmux_mcp.*`, and `tests`. A deprecation is attributed to the frame the +raising library points `stacklevel` at — the caller — so those three patterns +matched exactly the warnings saying this codebase must change, while unrelated +third-party noise still surfaced. `FastMCPDeprecationWarning` subclasses +`DeprecationWarning`, so FastMCP's own deprecations were caught by the same +filters. + +The three blanket entries are gone; the message-scoped docutils filter stays. +The suite is quiet without them apart from the one warning they were hiding, +now fixed: `asyncio.iscoroutinefunction` is deprecated and slated for removal +in Python 3.16, replaced with `inspect.iscoroutinefunction`. + +`DeprecationWarning` is deliberately not escalated to an error. This project +pins two fast-moving pre-2.0 dependencies, and an upstream patch release should +not be able to turn CI red on its own schedule. + ## libtmux-mcp 0.1.0a19 (2026-07-25) libtmux-mcp 0.1.0a19 makes {tooliconl}`wait-for-text` see the output it was asked to watch for, and puts a ceiling under every wait. The tool anchored one row below the cursor's position at entry, which on a quiescent pane is exactly where the next line lands, so the case it exists for — output you did not author, a daemon printing a single `ready` line — could not match at all. Waits are now bounded by a server ceiling, cancellable without orphaning their tmux child, and report an `outcome` that distinguishes a command that never ran from output that did not match from a pager owning the pane. The wait API changes shape in the process: `pattern` becomes `patterns`, `stop` markers end a wait early, and `wait_for_content_change` is removed in favour of `wait_for_text(patterns=null)`. diff --git a/pyproject.toml b/pyproject.toml index f1b419ce..9a90c7a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -255,9 +255,8 @@ testpaths = [ "src/libtmux_mcp", "tests", ] +# Filter by message, not by module: a module pattern matches the frame +# `stacklevel` points at, which for a deprecation is our own caller. filterwarnings = [ "ignore:The frontend.Option(Parser)? class.*:DeprecationWarning::", - "ignore::DeprecationWarning:libtmux.*:", - "ignore::DeprecationWarning:libtmux_mcp.*:", - "ignore::DeprecationWarning:tests:", ] diff --git a/tests/test_wait_for_tools.py b/tests/test_wait_for_tools.py index bd81a98a..cd76afe4 100644 --- a/tests/test_wait_for_tools.py +++ b/tests/test_wait_for_tools.py @@ -4,6 +4,7 @@ import asyncio import contextlib +import inspect import os import pathlib import signal @@ -54,8 +55,8 @@ def test_channel_tools_are_coroutines() -> None: assertion pins the async surface so a silent revert doesn't sneak through. """ - assert asyncio.iscoroutinefunction(wait_for_channel) - assert asyncio.iscoroutinefunction(signal_channel) + assert inspect.iscoroutinefunction(wait_for_channel) + assert inspect.iscoroutinefunction(signal_channel) @pytest.mark.usefixtures("mcp_session")