Skip to content

python: offer to install uv when creating a venv, and honor allowUvPythonInstall - #16511

Open
midleman wants to merge 8 commits into
mainfrom
midleman/python-interpreters-install-uv-from-the-create-v
Open

midleman wants to merge 8 commits into
mainfrom
midleman/python-interpreters-install-uv-from-the-create-v

Conversation

@midleman

@midleman midleman commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #16192

Creating a venv with uv no longer fails when uv isn't installed. Positron offers to install uv first, unless python.allowUvPythonInstall is off.

  • Create Environment wizard and the requirements.txt / pyproject.toml popup offer to install uv
  • With the setting off, Positron never installs uv, and its error notification links to the setting
  • With the setting off and uv missing, Create Environment and the New Folder flow don't offer uv
  • With the setting off, the Python: Install Python via uv command is hidden from the Command Palette
  • Setting description now says it covers installing uv

Demo - uv install off/disabled

uv-install-off.mp4

Demo - uv install on/enabled

uv-install-on.mp4

Updated setting veribage

allowUvPythonInstall-settings-editor

Release Notes

New Features

  • N/A

Bug Fixes

Validation Steps

@:interpreter @:new-folder-flow

  1. Without uv installed, create a venv with uv from the wizard or the requirements.txt popup: you're asked to install uv, then the .venv is created.
  2. Set python.allowUvPythonInstall to false (uv still missing): uv isn't listed in Create Environment or the New Folder flow's Environment Creation dropdown.
  3. With python.allowUvPythonInstall still false, Python: Install Python via uv isn't in the Command Palette.

Picking uv to create an environment without uv installed failed with
"Error while creating virtual environment". The uv provider now asks to
install uv first, and the requirements.txt / pyproject.toml prompt offers
uv (installing it on Yes) whenever python.allowUvPythonInstall is on.

Fixes #16192
ensureUvInstalled now refuses to install uv when python.allowUvPythonInstall
is off, covering the Create Environment wizard, the New Folder flow's
Install uv button, the global environment command and installPythonViaUv.
The setting description now says it covers installing uv, not just the
interpreter picker.
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

E2E Tests 🚀
This PR will run tests tagged with: @:critical @:interpreter @:new-folder-flow @:console

Why these tags?
Tag Source
@:critical Always runs (required)
@:interpreter PR description
@:new-folder-flow PR description
@:console Changed files

More on automatic tags from changed files.

readme  valid tags

@midleman

midleman commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

/explore

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

🔎 Exploratory testing f0e1067

1 moderate · 2 minor
View report →

@midleman

midleman commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

🔎 Exploratory testing f0e1067

1 moderate · 2 minor View report →

I fixed this... when uv is not installed and python.allowUvPythonInstall is off, uv no longer appears as a choice:

  • Python: Create Environment now shows only Venv and Conda.
  • The New Folder flow's Environment Creation dropdown drops uv as well, since it reads the same list.
  • The requirements.txt popup path is covered too. With the setting off, clicking Yes opens that same wizard, which now has no uv option.

If uv is already installed, it's still listed (first, as before). The setting only stops Positron from installing uv, not from using an existing one.

uv is no longer offered when it is missing and python.allowUvPythonInstall
is off, so the step never reaches the disabled state.
@midleman
midleman marked this pull request as ready for review October 8, 2026 14:42
@dhruvisompura

Copy link
Copy Markdown
Contributor

@midleman @isabelizimm Why are we showing the "Python: Install Python via uv" command in the command palette when the python.allowUvPythonInstall is off? I feel like we should hide that option too. It seems safe to assume a user wouldn't want to see that if they have explicitly disabled the setting. Am I missing something here?

"python.environmentProviders.enabled.markdownDescription": "Configures which Python environment providers are enabled in Positron. Check the box to enable or uncheck the box to disable an environment provider.\n\nRequires a restart to take effect.",
"python.environmentProviders.enable.markdownDeprecationMessage": "Deprecated. Use `#python.environmentProviders.enabled#` instead.",
"python.allowUvPythonInstall.markdownDescription": "Allow installing Python via uv from the interpreter picker. When enabled, shows an option to install Python using [uv](https://docs.astral.sh/uv/) if no suitable Python interpreter is found.",
"python.allowUvPythonInstall.markdownDescription": "Allow Positron to install [uv](https://docs.astral.sh/uv/) and to install Python with uv. When disabled, Positron does not offer to install uv anywhere, and the interpreter picker does not offer to install Python with uv.",

@dhruvisompura dhruvisompura Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

and the interpreter picker does not offer to install Python with uv.

Is the video in the PR description out of date? It shows the opposite of what the setting description says

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed, see #16511 (comment)

@midleman

midleman commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

@midleman @isabelizimm Why are we showing the "Python: Install Python via uv" command in the command palette when the python.allowUvPythonInstall is off? I feel like we should hide that option too. It seems safe to assume a user wouldn't want to see that if they have explicitly disabled the setting. Am I missing something here?

That's a valid question. I assume it's hideable under that circumstance? If we confirm that's what we want, I can make that update. 👍

@midleman

midleman commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

@dhruvisompura, i made a few updates:

  1. hid the Python: Install Python via uv command from the command palette when the setting is off
  2. updated the setting description: when it's off, Positron doesn't offer to install uv or to install Python with uv anywhere
  3. re-recorded both videos (and added a setting screenshot) in the PR description

@dhruvisompura
dhruvisompura self-requested a review October 9, 2026 21:59
midleman added a commit that referenced this pull request Oct 9, 2026
…r doc (#16574)

### Summary

One command now runs a whole exploratory test, locally and in CI, and
the verifier flags findings that match issues closed as not planned.

- `pipeline.mjs run` runs explore, verify, isolate and edit in order;
locally each agent is a `claude -p` session.
- CI now isolates UNRESOLVED findings, and both sides retry a failed
verifier once.
- Local runs show cost on the Run tile, stream a live feed to the shell,
and take a time limit you can change mid-run.
- The verifier shows an advisory "Intended?" column for findings
matching not-planned issues.
- New `CONTRIBUTING.md` maps what to edit for each kind of change;
bumped to 1.57.

### Release Notes

#### New Features

- N/A

#### Bug Fixes

- N/A

### Validation Steps

CI run on #16511 passed
([run](https://github.com/posit-dev/positron/actions/runs/37990923444));
the CI isolator path is still untested against a real agent.

@dhruvisompura dhruvisompura left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚀

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.

python interpreters: install uv from the "create venv from file" notification

2 participants