Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace --python-preference installed with managed #5637

Merged
merged 1 commit into from
Jul 31, 2024
Merged

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Jul 30, 2024

Collapses the previous default into "managed" and makes the "managed" behavior match "installed". People should use "only-managed" if they want that behavior, it seems overly complicated otherwise.

@zanieb zanieb added the preview Experimental behavior label Jul 30, 2024
@zanieb zanieb force-pushed the zb/python-managed branch 2 times, most recently from 8315b03 to 4a170cd Compare July 30, 2024 21:41
@zanieb zanieb marked this pull request as ready for review July 30, 2024 21:41
@zanieb zanieb added the configuration Settings and such label Jul 30, 2024
Collapses the previous default into "managed" and makes the "managed" behavior match "installed". People should use "only-managed" if they want that behavior, it seems overly complicated otherwise.
@zanieb zanieb merged commit 7ef8304 into main Jul 31, 2024
57 checks passed
@zanieb zanieb deleted the zb/python-managed branch July 31, 2024 13:40
zanieb added a commit that referenced this pull request Jul 31, 2024
Copy link
Member

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

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

I like it.

@zanieb
Copy link
Member Author

zanieb commented Jul 31, 2024

Thanks for giving it a look :)

charliermarsh pushed a commit that referenced this pull request Aug 3, 2024
….md (#5755)

## Summary
After referring to #5637 and doing
additional testing.
The default value in a stable state seems more reasonable to be
``only-system``. ``managed`` in preview.
```
cpython-3.11.9-windows-x86_64-none     C:\Users\name\AppData\Local\Programs\Python\Python311\python.exe

cpython-3.10.14-windows-x86_64-none    C:\Users\name\AppData\Roaming\uv\data\python\cpython-3.10.14-windows-x86_64-none\install\python.exe
cpython-3.10.11-windows-x86_64-none    C:\Users\name\AppData\Local\Programs\Python\Python310\python.exe

cpython-3.9.19-windows-x86_64-none     C:\Users\name\AppData\Roaming\uv\data\python\cpython-3.9.19-windows-x86_64-none\python.exe
```
test on uv 0.2.33 (build from
https://github.com/astral-sh/uv/tree/257007ccaf0912a41dfe91b534527a7b1f54e19a)
### Stable version
``uv venv -p 3.10`` is ``3.10.11`` (System Python)
``uv venv -p 3.9`` is ``No interpreter found``(3.9.19 for managed
Python)
``uv venv -p 3.9 --python-preference only-system`` is ``No interpreter
found``(fail)
``uv venv -p 3.9 --python-preference only-managed`` is
``3.9.19``(success)
Do not use managed Python, only use the system Python, so it can be
determined as ``only-system``.
### Preview mode
**Note:**  ``3.10.14`` is managed python, ``3.10.11`` is system python.
``uv venv -p 3.11 --preview`` is ``3.11.9`` (System Python)
``uv venv -p 3.10 --preview`` is ``3.10.14``
``uv venv -p 3.10 --preview --python-preference only-managed`` is
``3.10.14``
``uv venv -p 3.10 --preview --python-preference managed`` is ``3.10.14``
``uv venv -p 3.10 --preview --python-preference system`` is ``3.10.11``
``venv -p 3.10 --preview --python-preference only-system`` is
``3.10.11``
Prioritize the managed Python and then select the system Python, so it
can be determined as ``managed``.

-----
fixed #5754 
## Test Plan
Run website in local.

![image](https://github.com/user-attachments/assets/02b81d44-1a99-4165-aca5-6ce46345b539)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration Settings and such preview Experimental behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants