Skip to content

fix: __version__ from metadata; revert the fastmcp pin (v0.5.2) - #11

Merged
Roy-Kid merged 1 commit into
MolCrafts:masterfrom
Roy-Kid:fix/version-single-source
Aug 9, 2026
Merged

Roy-Kid merged 1 commit into
MolCrafts:masterfrom
Roy-Kid:fix/version-single-source

Conversation

@Roy-Kid

@Roy-Kid Roy-Kid commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Two corrections to 0.5.1.

__version__ disagreed with the distribution

0.5.1 shipped like this:

dist version      : 0.5.1
molmcp.__version__: 0.5.0

The literal in __init__.py sat beside the real version in pyproject.toml,
and a release bumps the manifest. It reads importlib.metadata.version now —
one source of truth — and three tests fail if a literal comes back.

The 0.5.1 pin did not do what it was meant to

fastmcp==4.0.0b2 was supposed to let uv install molmcp without
--prerelease=allow. Measured side by side, it does not:

uv pip install dist/*.whl                    → + fastmcp==4.0.0b2   ✅
uv pip install "molcrafts-molmcp==0.5.1"     → ✗ "there is no version of fastmcp==4.0.0b2"

A local wheel resolves either way; from an index uv refuses the exact pin
for the same reason it refuses the range — it does not enable pre-releases for
a transitive dependency, however that dependency is spelled. The pin bought
nothing and cost the automatic upgrade, so this reverts to >=4.0.0b1,<5:
resolves to 4.0.0b2 today, picks up 4.0.0 the day it ships, and the uv problem
goes with it.

Still FastMCP 4 only. 3.x speaks the protocol this repo was rebuilt off,
and a bare fastmcp lands on 3.4.6. >=4.0.0 resolves to nothing — PyPI's
4.x line is a1/a2/b1/b2 with no final yet.

Until then the flag is documented rather than worked around:
installation.md explains why uv add --prerelease=allow is needed, that pip
needs nothing extra, and that pinning is not a fix. The migration guide points
at it.

Test plan

  • pytest — 1028 passed, 2 skipped (3 new version-consistency tests)
  • ruff check / ruff format --check clean
  • __version__ and the distribution version agree
  • Every internal doc link resolves
  • CI green

…flag

**0.5.1 shipped with two disagreeing versions.** The distribution said 0.5.1
and `molmcp.__version__` still said 0.5.0, because the literal in
`__init__.py` sat beside the real version in `pyproject.toml` and a release
bumps the manifest. `importlib.metadata.version` is the one source now, and
three tests fail if a literal ever comes back.

**The 0.5.1 pin did not do what it was meant to.** `fastmcp==4.0.0b2` was
supposed to make uv install molmcp without `--prerelease=allow`. Measured
side by side, it does not: a local wheel resolves either way, but from an
index uv refuses the exact pin for the same reason it refuses the range — it
does not enable pre-releases for a transitive dependency, however that
dependency is spelled.

So the pin bought nothing and cost the automatic upgrade. Back to
`>=4.0.0b1,<5`, which resolves to 4.0.0b2 today and picks up 4.0.0 the day it
ships, taking the uv problem with it. Still FastMCP 4 only — 3.x speaks the
protocol this repo was rebuilt off, and a bare `fastmcp` lands on 3.4.6.

Until then the flag is documented rather than worked around: `installation.md`
explains why `uv add --prerelease=allow` is needed, that pip needs nothing,
and that pinning is not a fix; the migration guide points at it.
@Roy-Kid
Roy-Kid merged commit 640e2f4 into MolCrafts:master Aug 9, 2026
4 checks passed
@Roy-Kid
Roy-Kid deleted the fix/version-single-source branch August 9, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant