mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-22 21:44:18 +02:00
Remove deprecated fastmcp.server.apps / server.app shims (3.2)
Tier 2 aggressive-window removal: these shims were deprecated in 3.2, a shorter deprecation window than the usual policy. Canonical imports are fastmcp.apps / fastmcp.FastMCPApp.
This commit is contained in:
parent
9d95e34e19
commit
d1c51ea4db
4 changed files with 2 additions and 43 deletions
|
|
@ -43,7 +43,7 @@ def chart_view() -> str:
|
|||
|
||||
## AppConfig
|
||||
|
||||
`AppConfig` controls how a tool or resource participates in the Apps extension. Import it from `fastmcp.server.apps`:
|
||||
`AppConfig` controls how a tool or resource participates in the Apps extension. Import it from `fastmcp.apps`:
|
||||
|
||||
```python
|
||||
from fastmcp.apps import AppConfig
|
||||
|
|
|
|||
|
|
@ -444,7 +444,7 @@ async def dashboard(ctx: Context) -> dict:
|
|||
|
||||
**Future phases** will add a component DSL for building UIs declaratively, an in-repo renderer, and a `FastMCPApp` class.
|
||||
|
||||
Implementation: `fastmcp_slim/fastmcp/server/apps.py` (models and constants), with integration points in `server.py` (decorator parameters), `low_level.py` (extension advertisement), and `context.py` (`client_supports_extension` method).
|
||||
Implementation: `fastmcp_slim/fastmcp/apps/config.py` (models and constants), with integration points in `server.py` (decorator parameters), `low_level.py` (extension advertisement), and `context.py` (`client_supports_extension` method).
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
"""Backward-compatible re-exports from fastmcp.apps.app.
|
||||
|
||||
.. deprecated:: 3.2.0
|
||||
Import from ``fastmcp.apps.app`` or ``fastmcp`` instead.
|
||||
"""
|
||||
|
||||
import warnings
|
||||
|
||||
from fastmcp.apps.app import FastMCPApp as FastMCPApp
|
||||
from fastmcp.apps.app import _dispatch_decorator as _dispatch_decorator
|
||||
from fastmcp.apps.app import _make_resolver as _make_resolver
|
||||
from fastmcp.exceptions import FastMCPDeprecationWarning
|
||||
|
||||
warnings.warn(
|
||||
"'fastmcp.server.app' is deprecated. "
|
||||
"Use 'fastmcp.apps.app' or 'from fastmcp import FastMCPApp' instead.",
|
||||
FastMCPDeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
"""Backward-compatible re-exports from fastmcp.apps.
|
||||
|
||||
.. deprecated:: 3.2.0
|
||||
Import from ``fastmcp.apps`` instead.
|
||||
"""
|
||||
|
||||
import warnings
|
||||
|
||||
from fastmcp.apps.config import UI_EXTENSION_ID as UI_EXTENSION_ID
|
||||
from fastmcp.apps.config import AppConfig as AppConfig
|
||||
from fastmcp.apps.config import ResourceCSP as ResourceCSP
|
||||
from fastmcp.apps.config import ResourcePermissions as ResourcePermissions
|
||||
from fastmcp.apps.config import app_config_to_meta_dict as app_config_to_meta_dict
|
||||
from fastmcp.exceptions import FastMCPDeprecationWarning
|
||||
from fastmcp.utilities.mime import UI_MIME_TYPE as UI_MIME_TYPE
|
||||
from fastmcp.utilities.mime import resolve_ui_mime_type as resolve_ui_mime_type
|
||||
|
||||
warnings.warn(
|
||||
"'fastmcp.server.apps' is deprecated. Use 'from fastmcp.apps import ...' instead.",
|
||||
FastMCPDeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue