Consider changing the default behaviour of python-preference
#11039
Labels
enhancement
New feature or improvement to existing functionality
python-preference
#11039
Summary
Currently the default value of python-preference is
managed
, which may cause confusion if user is not aware of this.My Linux distro ships Python 3.13. If I haven't downloaded Python distributions with
uv python
, thenuvx
invokes system python (notepython version = 3.13.1
):But once I downloaded any version of managed Python distributions,
uvx
uses the managed version (e.g. 3.11 below):This default behaviour is confusing because:
python-preference
option 😄 )The fact that uv is ultra-fast makes the automatic installation of python versions even harder to notice. 😃 User might go into a random project that uses uv and unknowningly installed a managed version of Python that is different from system python. (the default behaviour is to auto-download Python)
Proposed Change
Only use managed version if running within a project, or if there is a
.python-version
file. For ad-hoc commands likeuvx
, always use system Python.This could a new option like
managed-if-within-a-project
or something similar (sorry I'm bad at naming)Example
No response
The text was updated successfully, but these errors were encountered: