fix: update broken documentation link in deprecation warning

The deprecation warning in Context.get_http_request() referenced a non-existent
URL https://gofastmcp.com/patterns/http-requests that returns 404. Updated to
point to the correct documentation at
https://gofastmcp.com/python-sdk/fastmcp-server-dependencies which contains
the actual get_http_request() function documentation.

Also updated the corresponding test to expect the new URL.

Fixes #1814

Co-authored-by: William Easton <strawgate@users.noreply.github.com>
This commit is contained in:
marvin-context-protocol[bot] 2025-09-14 14:49:57 +00:00
commit 9936facffe
2 changed files with 4 additions and 3 deletions

View file

@ -573,7 +573,7 @@ class Context:
warnings.warn(
"Context.get_http_request() is deprecated and will be removed in a future version. "
"Use get_http_request() from fastmcp.server.dependencies instead. "
"See https://gofastmcp.com/patterns/http-requests for more details.",
"See https://gofastmcp.com/python-sdk/fastmcp-server-dependencies for more details.",
DeprecationWarning,
stacklevel=2,
)

View file

@ -56,8 +56,9 @@ class TestContextDeprecations:
"Use get_http_request() from fastmcp.server.dependencies instead"
in str(warning.message)
)
assert "https://gofastmcp.com/patterns/http-requests" in str(
warning.message
assert (
"https://gofastmcp.com/python-sdk/fastmcp-server-dependencies"
in str(warning.message)
)