Skip to content
This repository was archived by the owner on Mar 29, 2026. It is now read-only.

fix: read __version__ from installed package metadata instead of hardcoded value#1116

Open
fahe1em1 wants to merge 1 commit into
vanna-ai:mainfrom
fahe1em1:fix/version-sync
Open

fix: read __version__ from installed package metadata instead of hardcoded value#1116
fahe1em1 wants to merge 1 commit into
vanna-ai:mainfrom
fahe1em1:fix/version-sync

Conversation

@fahe1em1

Copy link
Copy Markdown

Summary

  • Replaces hardcoded __version__ = "0.1.0" with importlib.metadata.version("vanna") so vanna.__version__ correctly reports the installed version (e.g. 2.0.2)
  • Falls back to "0.0.0" if the package metadata is unavailable (e.g. running from source without installing)

Fixes #1044

Test plan

  • pip install vanna && python -c "import vanna; print(vanna.__version__)" should print 2.0.2 (or the installed version)
  • Run existing test suite

https://claude.ai/code/session_011TWMvnjeLgAJg9XtxoLfZT

…coded value

The hardcoded __version__ = "0.1.0" was stale and out of sync with
pyproject.toml (2.0.2). Use importlib.metadata to read the version
from the installed package so it stays in sync automatically.

Fixes vanna-ai#1044

https://claude.ai/code/session_011TWMvnjeLgAJg9XtxoLfZT
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

import vanna >>> vanna.__version__ '0.1.0' ?

2 participants