Skip to content

Suppress an error when 'uv' is used instead of 'pip' - #618

Merged
tramora merged 1 commit into
mainfrom
602-support-uv
Nov 12, 2026
Merged

tramora merged 1 commit into
mainfrom
602-support-uv

Conversation

@tramora

@tramora tramora commented Aug 27, 2026 •

Copy link
Copy Markdown
Collaborator
  • take into account the 'uv' string in the INSTALLER meta-file

Fixes #602


TODO Before Asking for a Review

  • Rebase your branch to the latest version of main (or main-v10)
  • Make sure all CI workflows are green
  • When adding a public feature/fix: Update the Unreleased section of CHANGELOG.md (no date)
  • Self-Review: Review "Files Changed" tab and fix any problems you find
  • API Docs (only if there are changes in docstrings, rst files or samples):
    • Check the docs build without warning: see the log of the API Docs workflow
    • Check that your changes render well in HTML: download the API Docs artifact and open index.html
    • If there are any problems it is faster to iterate by building locally the API Docs

@tramora
tramora requested a review from popescu-v August 28, 2026 15:55
Comment thread khiops/core/internals/runner.py Resolved
Comment thread khiops/core/internals/runner.py Resolved
Comment thread khiops/core/internals/runner.py Resolved

@popescu-v popescu-v left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

See the comments.
Also, a test should be added to tests/test_khiops_integrations.py to this end.

Comment thread .github/workflows/tests.yml Resolved
Comment thread .github/workflows/tests.yml Resolved
Comment thread .github/workflows/tests.yml Resolved
Comment thread .github/workflows/tests.yml Resolved
Comment thread khiops/core/internals/runner.py Resolved

@popescu-v popescu-v left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

See the comments. Basically:

  • test in realistic conditions: uv run used in non-activated Uv environments.
  • have a dedicated "uv" installation method (it is not the same as Pip and should not be amalgamated with it IMHO).

Comment thread khiops/core/internals/runner.py Resolved

@popescu-v popescu-v left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, with three minor comments:

  • update a comment in the runner;
  • unsupport the user-site installation completely;
  • update the CHANGELOG.md file accordingly.

@tramora tramora changed the title Suppress a warning when 'uv' is used instead of 'pip' Suppress an error when 'uv' is used instead of 'pip' Nov 9, 2026
@tramora

tramora commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

LGTM, with three minor comments:

* update a comment in the runner;

* unsupport the user-site installation completely;

* update the CHANGELOG.md file accordingly.

All the required changes were done.

Comment thread CHANGELOG.md Resolved
Comment thread khiops/core/internals/runner.py Resolved
Comment thread khiops/core/internals/runner.py Resolved

@popescu-v popescu-v left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just two remaining points (3 comments), plus:

  • update installation instructions in README.md;
  • idem in doc/site/index.md.

Comment thread .github/workflows/tests.yml Resolved
@tramora

tramora commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

Last remark :
after a first refactoring of the _infer_khiops_installation_method - guessing only virtual environments for 'uv' and 'pip' - it would have been tempting to stop managing system-wide pip installation with the current PR.

However there are internal and external projects that still install the whole stack system-wide using pip (yes under the root user and in giving the --break-system-packages even these habits are discouraged). Moreover the Khiops still releases a khiops-python docker image in which the whole stack is installed this way.

So it is still relevant to support this installation method and it was not that difficult to modify _infer_khiops_installation_method accordingly

@popescu-v popescu-v left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. But IMHO the system-wide installation should at least be flagged with a warning. Nonetheless, this can be done in a future PR IMHO. Hence, this PR branch can be merged IMHO.

- take into account the 'uv' string in the INSTALLER meta-file, this will suppress a warning about an unknown installer
- no error is raised for 'uv' (but a warning instead) if the current Python environment does not match the library installation path. It is accepted as the virtual environment is not activated
@tramora
tramora merged commit b0a3117 into main Nov 12, 2026
9 checks passed
@tramora
tramora deleted the 602-support-uv branch November 12, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warning and Error When Installing with uv

2 participants