Switch RFC7523OAuthClientProvider warning to MCPDeprecationWarning (#2996)
This commit is contained in:
parent
5b2713d40c
commit
cc596195bb
1 changed files with 6 additions and 3 deletions
|
|
@ -20,6 +20,7 @@ from mcp.shared.auth import (
|
|||
OAuthMetadata,
|
||||
OAuthToken,
|
||||
)
|
||||
from mcp.shared.exceptions import MCPDeprecationWarning
|
||||
|
||||
|
||||
class MockTokenStorage:
|
||||
|
|
@ -68,7 +69,7 @@ def rfc7523_oauth_provider(client_metadata: OAuthClientMetadata, mock_storage: M
|
|||
return AuthorizationCodeResult(code="test_auth_code", state="test_state")
|
||||
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("ignore", DeprecationWarning)
|
||||
warnings.simplefilter("ignore", MCPDeprecationWarning)
|
||||
return RFC7523OAuthClientProvider(
|
||||
server_url="https://api.example.com/v1/mcp",
|
||||
client_metadata=client_metadata,
|
||||
|
|
|
|||
Loading…
Reference in a new issue