chore: consolidate uipath._utils.constants into uipath-platform.common.constants#1707
chore: consolidate uipath._utils.constants into uipath-platform.common.constants#1707vldcmp-uipath wants to merge 8 commits into
Conversation
The constants in uipath/_utils/constants.py and uipath-platform/.../common/constants.py have drifted into two near-identical modules — 53 shared symbols (identical values) with 6 symbols only in uipath-platform and 1 (LLMV4_REQUEST) only in uipath/_utils. External packages (uipath-llm-client-python, uipath-langchain-python) import from uipath.platform.common.constants. Internal uipath consumers import from uipath._utils.constants. A silent value drift between the two would create hard-to-debug cross-package bugs — same name, different value. Changes: - Add LLMV4_REQUEST to uipath-platform.common.constants so it becomes a strict superset of the previous content of uipath._utils.constants. - Replace uipath/_utils/constants.py with a re-export shim that emits a FutureWarning on import, telling consumers to migrate to uipath.platform.common.constants. - Migrate the 3 internal consumers (_cli/__init__.py, _cli/_utils/_studio_project.py, _cli/_evals/_progress_reporter.py) to import from the canonical path so uipath itself doesn't trigger its own deprecation warning. The shim preserves backward compatibility for any external consumer that may still import via uipath._utils.constants; they'll see the warning and can migrate at their own pace. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR consolidates duplicated constant definitions by making uipath.platform.common.constants the single source of truth and turning uipath._utils.constants into a backward-compatibility shim that emits a deprecation warning. It also updates internal CLI imports to use the canonical constants module so uipath doesn’t trigger its own deprecation warnings.
Changes:
- Added
LLMV4_REQUESTtouipath.platform.common.constants. - Replaced
uipath._utils.constantswith a re-export shim that warns on import. - Migrated internal CLI consumers to import constants from
uipath.platform.common.constants.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
packages/uipath/src/uipath/_utils/constants.py |
Replaced constants module with a re-export shim + deprecation warning. |
packages/uipath/src/uipath/_cli/_utils/_studio_project.py |
Updated constants import to canonical module. |
packages/uipath/src/uipath/_cli/_evals/_progress_reporter.py |
Updated constants import to canonical module. |
packages/uipath/src/uipath/_cli/__init__.py |
Updated constants import to canonical module. |
packages/uipath-platform/src/uipath/platform/common/constants.py |
Added LLMV4_REQUEST to the canonical constants module. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Bump versions for the constants consolidation: - uipath-platform 0.1.62 -> 0.1.63 (adds LLMV4_REQUEST) - uipath 2.10.79 -> 2.10.80 (shim + import migrations) - uipath's lower bound on uipath-platform bumped to >=0.1.63 so the shim's star-import resolves LLMV4_REQUEST in any installable combination. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
🚨 Heads up:
|
🚨 Heads up:
|
|


Fixes #1415
Summary
uipath/src/uipath/_utils/constants.pyuipath-platform/src/uipath/platform/common/constants.pyhave drifted into two near-identical modules. External packages (
uipath-llm-client-python,uipath-langchain-python) import fromuipath.platform.common.constants; internaluipathconsumers import fromuipath._utils.constants. A silent value drift between the two would create hard-to-debug cross-package bugs — same name, different value.This PR consolidates onto a single source of truth in
uipath-platform, leaving a thin shim with a deprecation warning at the old path for backward compatibility.Version bumps: uipath-platform 0.1.62 → 0.1.63, uipath 2.10.79 → 2.10.80.
Follow-ups (not in this PR)
🤖 Generated with Claude Code