Skip to content

Remove test warnings#2331

Merged
jlowin merged 1 commit intomainfrom
fix-test-warnings
Nov 1, 2025
Merged

Remove test warnings#2331
jlowin merged 1 commit intomainfrom
fix-test-warnings

Conversation

@jlowin
Copy link
Copy Markdown
Member

@jlowin jlowin commented Nov 1, 2025

Removes all warnings from the test suite by addressing two sources of noise:

Deprecated SSE app creation - Updated tests/client/test_sse.py:100 to use create_sse_app() directly instead of the deprecated server.sse_app() method:

from fastmcp.server.http import create_sse_app

sse_app = create_sse_app(
    server=server, 
    message_path="/mcp/messages", 
    sse_path="/mcp/sse/"
)

OAuth in-memory token storage warnings - Added pytest warning filter to suppress informational warnings about ephemeral token storage. These warnings are helpful for end users but not relevant in tests, which intentionally use ephemeral storage to avoid leaving artifacts:

filterwarnings = [
    "ignore:Using in-memory token storage:UserWarning",
]

All 229 client tests now pass with zero warnings.

@marvin-context-protocol marvin-context-protocol Bot added enhancement Improvement to existing functionality. For issues and smaller PR improvements. tests labels Nov 1, 2025
@jlowin jlowin merged commit dab125e into main Nov 1, 2025
12 checks passed
@jlowin jlowin deleted the fix-test-warnings branch November 1, 2025 18:53
jlowin added a commit that referenced this pull request Nov 1, 2025
* Remove test warnings (#2331)

* Create new branch and fix issue
jlowin added a commit that referenced this pull request Nov 1, 2025
jlowin added a commit that referenced this pull request Dec 1, 2025
* Initialize 2.14 deprecation removal branch

* Remove deprecated FASTMCP_SERVER_ environment variable prefix (#2330)

* Remove deprecated Context.get_http_request method (#2332)

* Remove fastmcp.Image top-level import (deprecated 2.8.1) (#2334)

* Remove test warnings (#2331)

* Create new branch and fix issue

* Remove deprecated client parameter from FastMCPProxy (#2333)

* Remove deprecated run_streamable_http_async method (#2338)

* Remove deprecated sse_app method (#2337)

* Remove deprecated run_sse_async method (#2335)

* Remove deprecated run_sse_async method

* Update CLI and tests to use run_http_async(transport="sse")

- Change CLI to call run_http_async with transport="sse" instead of run_sse_async
- Update test to mock run_http_async with create=True for v1 servers

* Revert CLI changes - v1 servers do have run_sse_async

- Keep CLI calling run_sse_async() for v1 compatibility
- Update test to mock run_sse_async (which exists on v1)

* Remove unnecessary type ignore for run_sse_async

Method exists on v1 FastMCP class, no type error

* Remove unused imports after test deletion

* Remove deprecated streamable_http_app method (#2336)

* Remove deprecated dependencies parameter from FastMCP constructor (#2340)

* Remove output_schema=False support (deprecated 2.11.4) (#2339)

* Remove deprecated client parameter from FastMCPProxy (#2333)

* Delete deprecated test_output_schema_false.py

Tests functionality that has been removed

* Remove deprecated BearerAuthProvider module (#2341)

* Remove resource_prefix_format="protocol" support (deprecated 2.4.0) (#2342)

* Remove resource_prefix_format="protocol" support (fixes #2195)

Removes deprecated protocol format (prefix+resource://path) and keeps only
path format (resource://prefix/path). Since only one format remains:

- Removed resource_prefix_format from settings, FastMCP.__init__, and helpers
- Simplified add_resource_prefix, remove_resource_prefix, has_resource_prefix
- Removed MountedServer.resource_prefix_format field
- Deleted tests for protocol format

All resource prefixes now use path format exclusively.

* Clean up resource_prefix_format references

- Remove from test files
- Update documentation to remove protocol format section
- Move custom HTTP routes note to mounting section
- Remove resource_prefix_format from settings docs

* Use inline version note instead of badge for prefix format

* Remove obsolete test functions and update docs

- Delete test functions that no longer assert anything
- Remove proxy.mdx reference to deleted prefix format section

* Format error messages per ruff

* Remove from_client classmethod (deprecated 2.8.0) (#2343)

* Remove deprecated from_client classmethod (fixes #2192)

* Remove unused Client import

* Remove add_resource_fn method (deprecated 2.7.0) (#2345)

* Update SDK

* Add missing imports for exclude_args deprecation warning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement to existing functionality. For issues and smaller PR improvements. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant