Skip to content

Commit 58fd39d

Browse files
authored
Merge branch 'main' into add_root_notification
2 parents 04476c4 + 5489e8b commit 58fd39d

File tree

15 files changed

+1129
-445
lines changed

15 files changed

+1129
-445
lines changed

.github/workflows/shared.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ jobs:
3838
python-version: ["3.10", "3.11", "3.12", "3.13"]
3939
dep-resolution:
4040
- name: lowest-direct
41-
install-flags: "--resolution lowest-direct"
41+
install-flags: "--upgrade --resolution lowest-direct"
4242
- name: highest
43-
install-flags: "--frozen"
43+
install-flags: "--upgrade --resolution highest"
4444
os: [ubuntu-latest, windows-latest]
4545

4646
steps:
@@ -57,11 +57,9 @@ jobs:
5757

5858
- name: Run pytest with coverage
5959
run: |
60-
uv run ${{ matrix.dep-resolution.install-flags }} --no-sync coverage run -m pytest
61-
uv run ${{ matrix.dep-resolution.install-flags }} --no-sync coverage combine
62-
uv run ${{ matrix.dep-resolution.install-flags }} --no-sync coverage report
63-
env:
64-
UV_RESOLUTION: ${{ matrix.dep-resolution.name == 'lowest-direct' && 'lowest-direct' || 'highest' }}
60+
uv run --frozen --no-sync coverage run -m pytest
61+
uv run --frozen --no-sync coverage combine
62+
uv run --frozen --no-sync coverage report
6563
6664
readme-snippets:
6765
runs-on: ubuntu-latest

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ dependencies = [
3434
"jsonschema>=4.20.0",
3535
"pywin32>=310; sys_platform == 'win32'",
3636
"pyjwt[crypto]>=2.10.1",
37+
"typing-extensions>=4.9.0",
38+
"typing-inspection>=0.4.1",
3739
]
3840

3941
[project.optional-dependencies]

src/mcp/client/auth/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
Implements authorization code flow with PKCE and automatic token refresh.
55
"""
66

7+
from mcp.client.auth.exceptions import OAuthFlowError, OAuthRegistrationError, OAuthTokenError
78
from mcp.client.auth.oauth2 import (
89
OAuthClientProvider,
9-
OAuthFlowError,
10-
OAuthRegistrationError,
11-
OAuthTokenError,
1210
PKCEParameters,
1311
TokenStorage,
1412
)

src/mcp/client/auth/exceptions.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class OAuthFlowError(Exception):
2+
"""Base exception for OAuth flow errors."""
3+
4+
5+
class OAuthTokenError(OAuthFlowError):
6+
"""Raised when token operations fail."""
7+
8+
9+
class OAuthRegistrationError(OAuthFlowError):
10+
"""Raised when client registration fails."""

0 commit comments

Comments
 (0)