[PR #5599] refactor(versioning): Remove importlib.metadata for dynamic versioning #4544

Open
opened 2026-02-20 17:50:22 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langchain-ai/langgraph/pull/5599

State: open
Merged: No


PR: Refactor Version Access – Remove importlib.metadata for Dynamic Versioning

This PR updates version access for all core Python packages, removing importlib.metadata and adopting explicit version.py files. This is based on and continues the work from #5094 (original PR by @YassinNouh21 – thank you for your effort and groundwork).

What’s Changed

  • Removes all use of importlib.metadata for version access.
  • Adds or updates version.py with __version__ in each package.
  • Updates all pyproject.toml and re-generates uv.lock files using latest tools (uv, etc.).
  • Formatted and linted with ruff.

Why

  • Aligns with recent review/discussion feedback.
  • Ensures versioning is explicit, static, and easy to manage across the monorepo.
  • Avoids import errors in environments where importlib.metadata is unreliable.

Testing & CI

  • All code formatted/linted.
  • Ran local tests as far as possible, but note:
    • Some failures are due to upstream or environment issues (e.g. langgraph.cache.sqlite import errors, missing test dependencies).
    • No test or unrelated code was modified.
  • Upstream test failures are expected and are not caused by these changes.

Additional Notes

  • This branch is up-to-date with the latest main to minimize merge conflicts.

Big thanks to @YassinNouh21 for the prior work on this!

Closes #5040

Let me know if you want changes split up, or if anything else is needed.

**Original Pull Request:** https://github.com/langchain-ai/langgraph/pull/5599 **State:** open **Merged:** No --- ## PR: Refactor Version Access – Remove `importlib.metadata` for Dynamic Versioning This PR updates version access for all core Python packages, removing `importlib.metadata` and adopting explicit `version.py` files. This is based on and continues the work from #[5094](https://github.com/langchain-ai/langgraph/pull/5094) (original PR by @YassinNouh21 – thank you for your effort and groundwork). ### What’s Changed - Removes all use of `importlib.metadata` for version access. - Adds or updates `version.py` with `__version__` in each package. - Updates all `pyproject.toml` and re-generates `uv.lock` files using latest tools (`uv`, etc.). - Formatted and linted with `ruff`. ### Why - Aligns with recent review/discussion feedback. - Ensures versioning is explicit, static, and easy to manage across the monorepo. - Avoids import errors in environments where `importlib.metadata` is unreliable. ### Testing & CI - All code formatted/linted. - Ran local tests as far as possible, but note: - Some failures are due to upstream or environment issues (e.g. `langgraph.cache.sqlite` import errors, missing test dependencies). - No test or unrelated code was modified. - Upstream test failures are expected and are not caused by these changes. ### Additional Notes - This branch is up-to-date with the latest `main` to minimize merge conflicts. --- Big thanks to @YassinNouh21 for the prior work on this! Closes #5040 Let me know if you want changes split up, or if anything else is needed.
yindo added the pull-request label 2026-02-20 17:50:22 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#4544