Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions superset/mcp_service/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@
# http://localhost:5009/mcp/
"""

import warnings

# authlib.jose is deprecated in authlib 1.3+ in favour of joserfc, but fastmcp
# still imports it internally. This filter must live here — it runs when any
# superset.mcp_service submodule is first imported, which is before fastmcp
# triggers the authlib.jose import. Placed in __init__.py so both the
# production server path and test imports get it without duplicating the
# filterwarnings call in every affected module.
warnings.filterwarnings(
"ignore",
message=r"authlib\.jose module is deprecated",
)

__version__ = "1.0.0"

# Tools are auto-registered when imported by the MCP service
Expand Down
7 changes: 7 additions & 0 deletions superset/mcp_service/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ def _suppress_third_party_warnings() -> None:
category=FutureWarning,
module=r"google\..*",
)
# authlib.jose deprecation warning is suppressed at package init time
# (superset/mcp_service/__init__.py), but add it here too for any late
# imports that may occur after tool execution begins.
warnings.filterwarnings(
"ignore",
message=r"authlib\.jose module is deprecated",
)


class FastMCPValidationFilter(logging.Filter):
Expand Down
Loading