Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore: Update SDK documentation#2761

Merged
jlowin merged 1 commit intomainfrom
marvin/update-sdk-docs
Jan 10, 2026
Merged

chore: Update SDK documentation#2761
jlowin merged 1 commit intomainfrom
marvin/update-sdk-docs

Conversation

@marvin-context-protocol
Copy link
Contributor

This PR updates the auto-generated SDK documentation to reflect the latest source code changes.

📚 Documentation is automatically generated from the source code docstrings and type annotations.

Note: This PR is fully automated and will update itself with any subsequent changes to the SDK, or close automatically if the documentation becomes up-to-date through other means. Feel free to leave it open until you're ready to merge.

🤖 Generated by Marvin

@marvin-context-protocol marvin-context-protocol bot added the ignore in release notes Minor change for release notes. Use sparingly for meta PRs like workflow tests. label Dec 26, 2025
@marvin-context-protocol marvin-context-protocol bot added the enhancement Improvement to existing functionality. For issues and smaller PR improvements. label Dec 26, 2025
@marvin-context-protocol marvin-context-protocol bot force-pushed the marvin/update-sdk-docs branch 2 times, most recently from 0d9da0b to 493f535 Compare December 29, 2025 13:29
@marvin-context-protocol
Copy link
Contributor Author

Test Failure Analysis

Summary: The integration test test_call_tool_list_commits failed due to a rate limit (HTTP 429) from GitHub's Copilot MCP API, causing a 30-second timeout.

Root Cause: The test makes a real HTTP call to https://api.githubcopilot.com/mcp/ and received a "429 Too Many Requests" response. The error occurred during teardown when the client attempted to disconnect, but the timeout happened earlier while waiting for the API response. This is an external API rate limit, not a code issue.

Suggested Solution:

  1. Retry the workflow - This is a transient external API issue unrelated to the documentation changes in this PR
  2. Consider adding retry logic to the test with exponential backoff for rate-limited responses
  3. Alternatively, mark this test as @pytest.mark.flaky since it depends on external API quota
Detailed Analysis

The test successfully called the list_commits tool (as shown in logs: "called call_tool: list_commits") but then hit GitHub's API rate limit during the response handling phase. The actual failure stack trace shows:

httpx.HTTPStatusError: Client error '429 Too Many Requests' for url 'https://api.githubcopilot.com/mcp/'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429

The timeout occurred because the test waited 30 seconds for a response that was blocked by rate limiting. This is confirmed by the fact that:

  • The same test passed in run #20574036985 (36 seconds earlier)
  • Only documentation files changed in this PR (no code modifications)
  • The error is specifically a 429 rate limit from an external API
Related Files
  • tests/integration_tests/test_github_mcp_remote.py:99 - The failing test that calls GitHub's remote MCP endpoint
  • No code changes in this PR - Only documentation updates in docs/python-sdk/

@marvin-context-protocol marvin-context-protocol bot force-pushed the marvin/update-sdk-docs branch 2 times, most recently from 7c7cc57 to bf7e00c Compare December 31, 2025 00:20
@marvin-context-protocol marvin-context-protocol bot force-pushed the marvin/update-sdk-docs branch 8 times, most recently from 9bbe90b to 5f21760 Compare January 7, 2026 19:30
@marvin-context-protocol
Copy link
Contributor Author

Test Failure Analysis

Summary: Windows tests are failing due to unawaited coroutine detection triggered by the new strict pytest configuration added in commit da965db.

Root Cause: The recent commit da965db ("Fix unawaited coroutine warning and treat as test error") added strict checking for unawaited coroutines in pyproject.toml:

filterwarnings = [
    "error:coroutine .* was never awaited:RuntimeWarning",
    "error:Exception ignored in.*coroutine:pytest.PytestUnraisableExceptionWarning",
]

This change causes tests to fail when coroutines are not properly awaited. The failure appears Windows-specific due to platform differences in garbage collection timing - unawaited coroutine warnings only trigger when Python's garbage collector runs, which happens at different times on different platforms.

Why this PR is affected: Although this PR only changes documentation files, it runs against the main branch which now has the stricter test configuration. The Windows test environment is detecting an unawaited coroutine that Linux tests aren't catching (likely due to GC timing differences).

Suggested Solution:

  1. Identify the specific test failure - We need the actual test logs from the Windows job to see which test is failing
  2. Fix the unawaited coroutine - Once identified, ensure all coroutines in that test are properly awaited
  3. Consider adding explicit gc.collect() in test teardown if the issue persists

Alternative: If logs show the failure is unrelated to code in this repo (e.g., external dependency issue), rerun the workflow as this could be transient.

Detailed Analysis

Why Windows Tests Fail Differently

According to pytest-asyncio issue #67, unawaited coroutine warnings are garbage collection-dependent:

The warning isn't issued until the coroutine is garbage collected, and on PyPy this can happen in some random other test, or if the test is near the end of the run it might never happen at all.

Windows and Linux have subtle differences in:

  • Memory management timing
  • When the GC runs
  • How quickly objects are destroyed

This means a test can pass on Linux but fail on Windows when stricter coroutine checking is enabled.

Tests Using @pytest.mark.flaky

The codebase has tests decorated with @pytest.mark.flaky (e.g., test_multi_client_transform_with_filtering), but pyproject.toml only includes pytest-flakefinder, not the flaky package that provides retry functionality. This means:

  • The @pytest.mark.flaky decorators are treated as unknown markers and ignored
  • Tests don't actually retry on failure
  • This could interact poorly with the new strict coroutine checking

Missing Logs

Unfortunately, I couldn't access the actual job logs (HTTP 403 error), so I cannot identify:

  • Which specific test failed
  • The exact error message
  • Stack trace showing the unawaited coroutine
Related Files
File Relevance
pyproject.toml:109-115 Contains the new strict coroutine checking configuration
.github/workflows/run-tests.yml:53-60 Shows Windows tests run without parallelization (line 56)
tests/test_mcp_config.py:642 Example of test using @pytest.mark.flaky decorator
tests/client/test_openapi.py:193 Another test using @pytest.mark.flaky decorator

Note: This analysis is based on available information. The actual test logs would provide definitive answers about which test failed and why. The Windows test job logs returned a 403 error when attempting to fetch them.

Analysis performed by Marvin Context Protocol bot

@marvin-context-protocol marvin-context-protocol bot force-pushed the marvin/update-sdk-docs branch 7 times, most recently from 8e72b71 to dc2aab1 Compare January 9, 2026 21:31
@marvin-context-protocol
Copy link
Contributor Author

Test Failure Analysis

Summary: The Windows test for in is timing out after 5 seconds during initialization.

Root Cause: The timeout occurs during SQLite database initialization when creating a for OAuth client storage. The stacktrace shows:

File "D:\a\fastmcp\fastmcp\src\fastmcp\server\auth\oauth_proxy.py", line 822, in __init__
  key_value=DiskStore(directory=settings.home / "oauth-proxy"),
File "D:\a\fastmcp\fastmcp\.venv\lib\site-packages\diskcache\core.py", line 456, in __init__
  sql = self._sql_retry
...
+++++++++++++++++++++++++++++++++++ Timeout +++++++++++++++++++++++++++++++++++

The test is hanging at SQLite connection initialization (sqlite3.connect) and hitting pytest's 5-second timeout.

Important Context: A fixture (isolate_settings_home) was recently added in commit b8d6f89 specifically to prevent SQLite database locking issues on Windows by giving each test an isolated temporary directory. However, the test is still failing.

Suggested Solution:

The issue is likely due to Windows-specific filesystem or SQLite locking behavior when accessing temporary directories. Consider one of these approaches:

  1. Skip this specific test on Windows (simplest, but least desirable):

    @pytest.mark.skipif(sys.platform == "win32", reason="SQLite timeout on Windows")
    def test_init_with_explicit_params(self, valid_oidc_configuration_dict):
  2. Mock the DiskStore initialization (recommended):
    Modify the test to mock the storage layer so it doesn't actually create a SQLite database:

    def test_init_with_explicit_params(self, valid_oidc_configuration_dict):
        with patch("fastmcp.server.auth.oidc_proxy.OIDCConfiguration.get_oidc_configuration") as mock_get:
            with patch("fastmcp.server.auth.oauth_proxy.DiskStore"):
                # ... rest of test
  3. Increase timeout for Windows or this specific test:
    Add a pytest marker to increase the timeout for this test on Windows.

  4. Use an in-memory store for tests:
    Modify oauth_proxy.py to accept a custom storage backend and inject a mock/in-memory storage during tests.

The root issue appears to be the interaction between pytest's tmp_path, Windows filesystem behavior, and diskcache's SQLite initialization. Similar issues have been documented in the diskcache issue tracker.

Detailed Analysis

Full Stacktrace Location

tests/server/auth/providers/test_auth0.py:47src/fastmcp/server/auth/auth0.py:104src/fastmcp/server/auth/oidc_proxy.py:378src/fastmcp/server/auth/oauth_proxy.py:822diskcache.core.Cache.__init__ → SQLite connection timeout

Test Details

  • Only fails on Windows (Python 3.10)
  • Passes on Ubuntu (Python 3.10, 3.13) and with lowest dependencies
  • Integration tests also pass
  • The test initializes Auth0Provider with mocked OIDC configuration

Why the Recent Fix Didn't Work

The isolate_settings_home fixture correctly provides each test with a unique temporary directory via pytest's tmp_path. However, the SQLite timeout suggests the issue is deeper - possibly related to:

  • Windows file locking behavior in temporary directories
  • Antivirus or security software interference
  • SQLite's Windows-specific connection behavior
  • Insufficient directory permissions in GitHub Actions Windows runner
Related Files
  • tests/server/auth/providers/test_auth0.py:47 - The failing test
  • src/fastmcp/server/auth/oauth_proxy.py:822 - Where DiskStore is created
  • tests/conftest.py:34-45 - The isolate_settings_home fixture
  • .github/workflows/*.yml - Windows test configuration (note: Windows runs tests sequentially without xdist parallelization)

📊 This analysis is based on workflow run 20869847468

Sources:

@marvin-context-protocol
Copy link
Contributor Author

Test Failure Analysis

Summary: The Windows test for test_init_with_explicit_params in tests/server/auth/providers/test_auth0.py is timing out after 5 seconds during Auth0Provider initialization.

Root Cause: The timeout occurs during SQLite database initialization when creating a DiskStore for OAuth client storage. The stacktrace shows:

File "D:\a\fastmcp\fastmcp\src\fastmcp\server\auth\oauth_proxy.py", line 822, in __init__
  key_value=DiskStore(directory=settings.home / "oauth-proxy"),
File "D:\a\fastmcp\fastmcp\.venv\lib\site-packages\diskcache\core.py", line 456, in __init__
  sql = self._sql_retry
...
+++++++++++++++++++++++++++++++++++ Timeout +++++++++++++++++++++++++++++++++++

The test is hanging at SQLite connection initialization (sqlite3.connect) and hitting pytest's 5-second timeout.

Important Context: A fixture (isolate_settings_home) was recently added in commit b8d6f89 specifically to prevent SQLite database locking issues on Windows by giving each test an isolated temporary directory. However, the test is still failing.

Suggested Solution:

The issue is likely due to Windows-specific filesystem or SQLite locking behavior when accessing temporary directories. Consider one of these approaches:

  1. Skip this specific test on Windows (simplest, but least desirable):

    @pytest.mark.skipif(sys.platform == "win32", reason="SQLite timeout on Windows")
    def test_init_with_explicit_params(self, valid_oidc_configuration_dict):
  2. Mock the DiskStore initialization (recommended):
    Modify the test to mock the storage layer so it doesn't actually create a SQLite database:

    def test_init_with_explicit_params(self, valid_oidc_configuration_dict):
        with patch("fastmcp.server.auth.oidc_proxy.OIDCConfiguration.get_oidc_configuration") as mock_get:
            with patch("fastmcp.server.auth.oauth_proxy.DiskStore"):
                # ... rest of test
  3. Increase timeout for Windows or this specific test:
    Add a pytest marker to increase the timeout for this test on Windows.

  4. Use an in-memory store for tests:
    Modify oauth_proxy.py to accept a custom storage backend and inject a mock/in-memory storage during tests.

The root issue appears to be the interaction between pytest's tmp_path, Windows filesystem behavior, and diskcache's SQLite initialization. Similar issues have been documented in the diskcache issue tracker.

Detailed Analysis

Full Stacktrace Location

tests/server/auth/providers/test_auth0.py:47src/fastmcp/server/auth/auth0.py:104src/fastmcp/server/auth/oidc_proxy.py:378src/fastmcp/server/auth/oauth_proxy.py:822diskcache.core.Cache.__init__ → SQLite connection timeout

Test Details

  • Only fails on Windows (Python 3.10)
  • Passes on Ubuntu (Python 3.10, 3.13) and with lowest dependencies
  • Integration tests also pass
  • The test initializes Auth0Provider with mocked OIDC configuration

Why the Recent Fix Didn't Work

The isolate_settings_home fixture correctly provides each test with a unique temporary directory via pytest's tmp_path. However, the SQLite timeout suggests the issue is deeper - possibly related to:

  • Windows file locking behavior in temporary directories
  • Antivirus or security software interference
  • SQLite's Windows-specific connection behavior
  • Insufficient directory permissions in GitHub Actions Windows runner
Related Files
  • tests/server/auth/providers/test_auth0.py:47 - The failing test
  • src/fastmcp/server/auth/oauth_proxy.py:822 - Where DiskStore is created
  • tests/conftest.py:34-45 - The isolate_settings_home fixture
  • .github/workflows/*.yml - Windows test configuration (note: Windows runs tests sequentially without xdist parallelization)

📊 This analysis is based on workflow run 20869847468

Sources:

@jlowin jlowin merged commit 24d500d into main Jan 10, 2026
11 checks passed
@jlowin jlowin deleted the marvin/update-sdk-docs branch January 10, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement to existing functionality. For issues and smaller PR improvements. ignore in release notes Minor change for release notes. Use sparingly for meta PRs like workflow tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant