mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-24 06:24:18 +02:00
Use full path for settings.deprecation_warnings access
Changed from settings_module.settings.deprecation_warnings to fastmcp.settings.settings.deprecation_warnings for clarity.
This commit is contained in:
parent
17b60c8815
commit
598b10090e
7 changed files with 13 additions and 12 deletions
|
|
@ -27,7 +27,7 @@ from key_value.aio.protocols import AsyncKeyValue
|
|||
from pydantic import AnyHttpUrl, SecretStr, field_validator
|
||||
from pydantic_settings import BaseSettings
|
||||
|
||||
import fastmcp.settings as settings_module
|
||||
import fastmcp.settings
|
||||
from fastmcp.server.auth.oidc_dcr_proxy import OIDCDCRProxy
|
||||
from fastmcp.settings import (
|
||||
ENV_FILE,
|
||||
|
|
@ -212,7 +212,7 @@ class Auth0Provider(Auth0DCRProvider):
|
|||
"""
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
if settings_module.settings.deprecation_warnings:
|
||||
if fastmcp.settings.settings.deprecation_warnings:
|
||||
warnings.warn(
|
||||
"Auth0Provider is deprecated, use Auth0DCRProvider instead",
|
||||
DeprecationWarning,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ from key_value.aio.protocols import AsyncKeyValue
|
|||
from pydantic import AnyHttpUrl, SecretStr, field_validator
|
||||
from pydantic_settings import BaseSettings
|
||||
|
||||
import fastmcp.settings as settings_module
|
||||
import fastmcp.settings
|
||||
from fastmcp.server.auth import TokenVerifier
|
||||
from fastmcp.server.auth.auth import AccessToken
|
||||
from fastmcp.server.auth.oidc_dcr_proxy import OIDCDCRProxy
|
||||
|
|
@ -263,7 +263,7 @@ class AWSCognitoProvider(AWSCognitoDCRProvider):
|
|||
"""
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
if settings_module.settings.deprecation_warnings:
|
||||
if fastmcp.settings.settings.deprecation_warnings:
|
||||
warnings.warn(
|
||||
"AWSCognitoProvider is deprecated, use AWSCognitoDCRProvider instead",
|
||||
DeprecationWarning,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ from key_value.aio.protocols import AsyncKeyValue
|
|||
from pydantic import SecretStr, field_validator
|
||||
from pydantic_settings import BaseSettings
|
||||
|
||||
import fastmcp.settings as settings_module
|
||||
import fastmcp.settings
|
||||
from fastmcp.server.auth.oauth_dcr_proxy import OAuthDCRProxy
|
||||
from fastmcp.server.auth.providers.jwt import JWTVerifier
|
||||
from fastmcp.settings import (
|
||||
|
|
@ -315,7 +315,7 @@ class AzureProvider(AzureDCRProvider):
|
|||
"""
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
if settings_module.settings.deprecation_warnings:
|
||||
if fastmcp.settings.settings.deprecation_warnings:
|
||||
warnings.warn(
|
||||
"AzureProvider is deprecated, use AzureDCRProvider instead",
|
||||
DeprecationWarning,
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ from key_value.aio.protocols import AsyncKeyValue
|
|||
from pydantic import AnyHttpUrl, SecretStr, field_validator
|
||||
from pydantic_settings import BaseSettings
|
||||
|
||||
import fastmcp.settings as settings_module
|
||||
import fastmcp.settings
|
||||
from fastmcp.server.auth import TokenVerifier
|
||||
from fastmcp.server.auth.auth import AccessToken
|
||||
from fastmcp.server.auth.oauth_dcr_proxy import OAuthDCRProxy
|
||||
|
|
@ -324,7 +324,7 @@ class GitHubProvider(GitHubDCRProvider):
|
|||
"""
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
if settings_module.settings.deprecation_warnings:
|
||||
if fastmcp.settings.settings.deprecation_warnings:
|
||||
warnings.warn(
|
||||
"GitHubProvider is deprecated, use GitHubDCRProvider instead",
|
||||
DeprecationWarning,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ from key_value.aio.protocols import AsyncKeyValue
|
|||
from pydantic import AnyHttpUrl, SecretStr, field_validator
|
||||
from pydantic_settings import BaseSettings
|
||||
|
||||
import fastmcp.settings as settings_module
|
||||
import fastmcp.settings
|
||||
from fastmcp.server.auth import TokenVerifier
|
||||
from fastmcp.server.auth.auth import AccessToken
|
||||
from fastmcp.server.auth.oauth_dcr_proxy import OAuthDCRProxy
|
||||
|
|
@ -343,7 +343,7 @@ class GoogleProvider(GoogleDCRProvider):
|
|||
"""
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
if settings_module.settings.deprecation_warnings:
|
||||
if fastmcp.settings.settings.deprecation_warnings:
|
||||
warnings.warn(
|
||||
"GoogleProvider is deprecated, use GoogleDCRProvider instead",
|
||||
DeprecationWarning,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ from pydantic_settings import BaseSettings
|
|||
from starlette.responses import JSONResponse
|
||||
from starlette.routing import Route
|
||||
|
||||
import fastmcp.settings as settings_module
|
||||
import fastmcp.settings
|
||||
from fastmcp.server.auth import AccessToken, RemoteAuthProvider, TokenVerifier
|
||||
from fastmcp.server.auth.oauth_dcr_proxy import OAuthDCRProxy
|
||||
from fastmcp.server.auth.providers.jwt import JWTVerifier
|
||||
|
|
@ -301,7 +301,7 @@ class WorkOSProvider(WorkOSDCRProvider):
|
|||
"""
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
if settings_module.settings.deprecation_warnings:
|
||||
if fastmcp.settings.settings.deprecation_warnings:
|
||||
warnings.warn(
|
||||
"WorkOSProvider is deprecated, use WorkOSDCRProvider instead",
|
||||
DeprecationWarning,
|
||||
|
|
|
|||
|
|
@ -145,6 +145,7 @@ class Settings(BaseSettings):
|
|||
which accessed fastmcp.settings.settings
|
||||
"""
|
||||
# Deprecated in 2.8.0
|
||||
breakpoint()
|
||||
logger.warning(
|
||||
"Using fastmcp.settings.settings is deprecated. Use fastmcp.settings instead.",
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue