Skip to content

πŸš€ The fast, Pythonic way to build MCP servers and clients.

Skip live-import validation for frozen v2 doc snapshots

Jeremiah Lowinbe8aee3a9673
diff --git a/tests/docs/test_doc_examples.py b/tests/docs/test_doc_examples.py
index 9e1a8e4ea..3d51e4e2b 100644
--- a/tests/docs/test_doc_examples.py
+++ b/tests/docs/test_doc_examples.py
@@ -121,6 +121,12 @@ def test_doc_examples_quality():
syntax_failures.append(err)
continue
+ # Frozen version snapshots (docs/v2/...) document older FastMCP releases,
+ # so their imports are validated against a package that no longer ships
+ # them. Syntax-check them above, but skip live-import validation.
+ if Path(ex.path).relative_to(DOCS_DIR).parts[0] == "v2":
+ continue
+
import_failures.extend(_check_fastmcp_imports(ex))
total = len(examples)