mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-27 22:14:14 +00:00
![]() Closes https://github.com/astral-sh/uv/issues/11214 Special-cases the first Python executable we find on the `PATH`, allowing it to be considered during searches for virtual environments. For some context, there are two stages to Python interpreter discovery 1. We find possible Python executables in various sources 2. We query the executables to determine canonical metadata about the interpreter We can't really be "sure" if an executable is a complaint virtual environment during (1), we need to query the interpreter first. This means that if you're only allowed to installed into virtual environments, we'll query every interpreter on your PATH. This is not performant, and causes confusion for users. Notably, I recently improved error messaging when we can't find any valid interpreters, by showing the error message we encounter while querying an interpreter (if any). However, this is problematic when there's an error for an interpreter that is not relevant to your search. In https://github.com/astral-sh/uv/pull/11143, I added filtering to avoid querying additional interpreters, but that regressed some user experiences where they were relying on us finding implicitly active virtual environments via the PATH. |
||
---|---|---|
.. | ||
python | ||
src | ||
Cargo.toml | ||
download-metadata.json | ||
fetch-download-metadata.py | ||
template-download-metadata.py |