Skip to content

chore: consolidate uipath._utils.constants into uipath-platform.common.constants#1707

Open
vldcmp-uipath wants to merge 8 commits into
mainfrom
chore/consolidate-uipath-constants
Open

chore: consolidate uipath._utils.constants into uipath-platform.common.constants#1707
vldcmp-uipath wants to merge 8 commits into
mainfrom
chore/consolidate-uipath-constants

Conversation

@vldcmp-uipath

@vldcmp-uipath vldcmp-uipath commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Fixes #1415

Summary

  • uipath/src/uipath/_utils/constants.py
  • uipath-platform/src/uipath/platform/common/constants.py

have drifted into two near-identical modules. 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.

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)

  • After enough release cycles, the shim can be deleted outright.

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings June 10, 2026 12:42
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-integrations labels Jun 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_REQUEST to uipath.platform.common.constants.
  • Replaced uipath._utils.constants with 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.

Comment thread packages/uipath-platform/src/uipath/platform/common/constants.py
Comment thread packages/uipath/src/uipath/_utils/constants.py Outdated
vldcmp-uipath and others added 4 commits June 10, 2026 15:46
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>
@vldcmp-uipath vldcmp-uipath changed the title chore: consolidate uipath constants into uipath-platform chore: consolidate uipath._utils.constants into uipath-platform.common.constants Jun 10, 2026
vldcmp-uipath and others added 3 commits June 10, 2026 17:17
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>
@github-actions

Copy link
Copy Markdown

🚨 Heads up: uipath-integrations cross-tests are FAILING 🚨

Your changes may break one or more integrations in uipath-integrations-python:

  • uipath-openai-agents
  • uipath-google-adk
  • uipath-agent-framework
  • uipath-llamaindex
  • uipath-pydantic-ai

⚠️ These checks are NOT enforced by branch protection rules. Please review the failures before merging.

🔍 Inspect the failed run →

@github-actions

Copy link
Copy Markdown

🚨 Heads up: uipath-langchain cross-tests are FAILING 🚨

Your changes may break the uipath-langchain-python integration.

⚠️ These checks are NOT enforced by branch protection rules. Please review the failures before merging.

🔍 Inspect the failed run →

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
3.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@vldcmp-uipath vldcmp-uipath linked an issue Jun 10, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-integrations test:uipath-langchain Triggers tests in the uipath-langchain-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UiPath general constants duplicated

2 participants