mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-22 05:24:18 +02:00
Remove fastmcp.Image top-level import (deprecated 2.8.1) (#2334)
* Remove test warnings (#2331) * Create new branch and fix issue
This commit is contained in:
parent
deb2491f45
commit
d845d541b8
1 changed files with 0 additions and 20 deletions
|
|
@ -27,26 +27,6 @@ if settings.deprecation_warnings:
|
|||
warnings.simplefilter("default", DeprecationWarning)
|
||||
|
||||
|
||||
def __getattr__(name: str):
|
||||
"""
|
||||
Used to deprecate the module-level Image class; can be removed once it is no longer imported to root.
|
||||
"""
|
||||
if name == "Image":
|
||||
# Deprecated in 2.8.1
|
||||
if settings.deprecation_warnings:
|
||||
warnings.warn(
|
||||
"The top-level `fastmcp.Image` import is deprecated "
|
||||
"and will be removed in a future version. "
|
||||
"Please use `fastmcp.utilities.types.Image` instead.",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
from fastmcp.utilities.types import Image
|
||||
|
||||
return Image
|
||||
raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
|
||||
|
||||
|
||||
__all__ = [
|
||||
"Client",
|
||||
"Context",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue