[PR #5529] refactor(langgraph): make constants generally private with a few select exports #4502

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

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

State: closed
Merged: Yes


Most of the constants we use are for internal pregel operations.

Moved all constants to langgraph/_internal/_constants.py. A few select public ones are included in langgraph/constants.py.

Backwards compatibility is ensured with a custom __getattr__ that fetches from the private location.

Breaking changes

  • Removes SELF constant, was only used for internal purposes, this should have no impact on users.

This is important to include pre-v1 as we want to solidify the lines of public/private differentiations.

Tests failing are expected (currently failing on v1 branch) and to be fixed in a different PR soon.

**Original Pull Request:** https://github.com/langchain-ai/langgraph/pull/5529 **State:** closed **Merged:** Yes --- Most of the constants we use are for internal pregel operations. Moved all constants to `langgraph/_internal/_constants.py`. A few select public ones are included in `langgraph/constants.py`. Backwards compatibility is ensured with a custom `__getattr__` that fetches from the private location. ## Breaking changes * Removes `SELF` constant, was only used for internal purposes, this should have no impact on users. This is important to include pre-v1 as we want to solidify the lines of public/private differentiations. Tests failing are expected (currently failing on v1 branch) and to be fixed in a different PR soon.
yindo added the pull-request label 2026-02-20 17:50:18 -05:00
yindo closed this issue 2026-02-20 17:50:18 -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#4502