fastmcp/tests
Jeremiah Lowin 96c7a74b27
Move OpenAPI to providers/openapi submodule (#2672)
* Move OpenAPI to providers/openapi/ submodule

Migrates the OpenAPI implementation to the provider pattern:
- Creates src/fastmcp/server/providers/openapi/ submodule with provider.py,
  components.py, and routing.py
- Converts server/openapi/ to deprecated re-export stubs
- FastMCPOpenAPI remains as deprecated wrapper that uses OpenAPIProvider
- Updates experimental/server/openapi to import from new canonical location

* Update tests and FastMCP methods to use OpenAPIProvider

- Update FastMCP.from_openapi() and from_fastapi() to use OpenAPIProvider
  directly, returning FastMCP instead of deprecated FastMCPOpenAPI
- Move tests from tests/server/openapi/ to tests/server/providers/openapi/
- Update all test imports to use new canonical location
- Add tests/deprecated/openapi/ for backward compatibility testing
- Update tests/client/test_openapi.py to use new imports

* Fix deprecation warning tests and address CodeRabbit feedback

- Use importlib.reload() to ensure deprecation warnings fire in tests
- Change logger.error to logger.exception for better stack traces
2025-12-22 11:13:33 -05:00
..
cli Replace type: ignore[attr-defined] with isinstance assertions in tests (#2665) 2025-12-21 16:37:20 -05:00
client Move OpenAPI to providers/openapi submodule (#2672) 2025-12-22 11:13:33 -05:00
contrib Refactor provider execution: components own their execution (#2663) 2025-12-21 15:03:24 -05:00
deprecated Move OpenAPI to providers/openapi submodule (#2672) 2025-12-22 11:13:33 -05:00
experimental Unify SamplingHandler and promote OpenAI handler (#2616) 2025-12-14 15:22:43 -05:00
integration_tests Replace type: ignore[attr-defined] with isinstance assertions in tests (#2665) 2025-12-21 16:37:20 -05:00
prompts Replace type: ignore[attr-defined] with isinstance assertions in tests (#2665) 2025-12-21 16:37:20 -05:00
resources Add supports_tasks() method to replace string mode checks (#2664) 2025-12-21 15:41:46 -05:00
server Move OpenAPI to providers/openapi submodule (#2672) 2025-12-22 11:13:33 -05:00
tools Add poll_interval to TaskConfig (#2666) 2025-12-21 16:59:43 -05:00
utilities Replace type: ignore[attr-defined] with isinstance assertions in tests (#2665) 2025-12-21 16:37:20 -05:00
__init__.py Update type handling for resources 2024-11-29 19:42:46 -05:00
conftest.py Use WindowsSelectorEventLoopPolicy to fix Windows test warnings (#2607) 2025-12-14 08:39:44 -05:00
test_mcp_config.py Bump ty to ==0.0.1a25 (#2350) 2025-11-02 20:02:45 -05:00