mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-22 21:44:18 +02:00
Remove TaskConfig and client from root exports (#2580)
This commit is contained in:
parent
54156d6b93
commit
b20de51512
4 changed files with 6 additions and 6 deletions
|
|
@ -69,7 +69,8 @@ For fine-grained control over task execution behavior, use `TaskConfig` instead
|
|||
| `"required"` | Error: task required | Executes as background task |
|
||||
|
||||
```python
|
||||
from fastmcp import FastMCP, TaskConfig
|
||||
from fastmcp import FastMCP
|
||||
from fastmcp.server.tasks import TaskConfig
|
||||
|
||||
mcp = FastMCP("MyServer")
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ if settings.log_enabled:
|
|||
|
||||
from fastmcp.server.server import FastMCP
|
||||
from fastmcp.server.context import Context
|
||||
from fastmcp.server.tasks.config import TaskConfig
|
||||
import fastmcp.server
|
||||
|
||||
from fastmcp.client import Client
|
||||
|
|
@ -32,7 +31,5 @@ __all__ = [
|
|||
"Client",
|
||||
"Context",
|
||||
"FastMCP",
|
||||
"TaskConfig",
|
||||
"client",
|
||||
"settings",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -8,9 +8,10 @@ Tests that the server correctly enforces task execution modes:
|
|||
|
||||
import pytest
|
||||
|
||||
from fastmcp import FastMCP, TaskConfig
|
||||
from fastmcp import FastMCP
|
||||
from fastmcp.client import Client
|
||||
from fastmcp.exceptions import ToolError
|
||||
from fastmcp.server.tasks import TaskConfig
|
||||
|
||||
|
||||
class TestTaskConfigNormalization:
|
||||
|
|
|
|||
|
|
@ -10,9 +10,10 @@ import asyncio
|
|||
import pytest
|
||||
from docket import Docket
|
||||
|
||||
from fastmcp import FastMCP, TaskConfig
|
||||
from fastmcp import FastMCP
|
||||
from fastmcp.client import Client
|
||||
from fastmcp.server.dependencies import CurrentDocket, CurrentFastMCP
|
||||
from fastmcp.server.tasks import TaskConfig
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue