fastmcp/tests/server/versioning
fei e15fc44bd5
fix(versions): deterministic meta.fastmcp.versions ordering (#4880)
* fix(versions): deterministic meta.fastmcp.versions ordering

dedupe_with_versions() sorted version strings by parse_version_key()
only, and sorted() is stable, so PEP 440-equivalent spellings ("1" vs
"1.0") kept their registration order in meta.fastmcp.versions. The
same component registered before vs after another equivalent spelling
produced different metadata.

Apply the raw-string tie-breaker from #4058 (version_sort_key) to this
sort as well: equivalent spellings now always order lexicographically,
making the injected list independent of registration order.

Fixes #4867

* Fix version metadata test typing

---------

Co-authored-by: fei <feiiiiii5@users.noreply.github.com>
Co-authored-by: nate nowack <thrast36@gmail.com>
2026-09-11 14:25:31 -05:00
..
__init__.py Consolidate test fixtures and refactor large test files (#2941) 2026-01-19 15:18:35 -05:00
test_calls.py Migrate to MCP Python SDK v2 (#4437) 2026-07-06 17:36:45 -04:00
test_filtering.py Add include_unversioned option to VersionFilter (#3349) 2026-03-02 21:06:50 -05:00
test_mounting.py Migrate to MCP Python SDK v2 (#4437) 2026-07-06 17:36:45 -04:00
test_versioning.py fix(versions): deterministic meta.fastmcp.versions ordering (#4880) 2026-09-11 14:25:31 -05:00
test_visibility_version_fallback.py Migrate to MCP Python SDK v2 (#4437) 2026-07-06 17:36:45 -04:00