FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Allow `uv run` to be used without `--no-project` by Avasam · Pull Request #13599 · python/typeshed · GitHub

Repository navigation

Allow uv run to be used without --no-project - #13599

Merged
srittau merged 7 commits into
python:mainfrom
Avasam:promote-usage-of-uv-run
Mar 12, 2025
Merged

srittau merged 7 commits into
python:mainfrom
Avasam:promote-usage-of-uv-run

Conversation

Avasam commented Mar 8, 2025 •
edited
Loading

Copy link
Copy Markdown
Collaborator

This enables running uv run without having to add --no-project every time. Until astral-sh/uv#8666, this requires adding a [project] section to pyproject.toml and .gitignoring the uv.lock file.

Using uv run is optional. "medium to advanced" python users already know to activate their venv and use the right py/python/python3 command if they want to.

Contributors who want to use uv run but with a custom venv can do so with uv run --active. I use that on WSL with a .venv-linux venv.

Avasam added the project: infrastructure typeshed build, test, or distribution related label Mar 8, 2025

Avasam commented Mar 8, 2025

Copy link
Copy Markdown
Collaborator Author

Oh, no shebang update until astral-sh/ruff#13021, I'll revert those.

Akuli commented Mar 9, 2025 •
edited
Loading

Copy link
Copy Markdown
Collaborator

Let's wait for #13597 (comment) to be resolved before merging this. (Edit: resolved now)

Akuli commented Mar 11, 2025 •
edited
Loading

Copy link
Copy Markdown
Collaborator

I still don't like this. If someone wants to contribute a small fix to typeshed, e.g. stubs for a simple library, they shouldn't be thrown on a tangent about a tool named uv that they don't really even need to use.

python vs python3

I think it is safe to assume that anyone contributing to typeshed already knows how to run Python on their own system. Figuring out whether to put 3 in the command or not is much easier than learning about uv, even if uv is very simple and easy to use.

Avasam commented Mar 11, 2025 •
edited
Loading

Copy link
Copy Markdown
Collaborator Author

I still don't like this. If someone wants to contribute a small fix to typeshed, e.g. stubs for a simple library, they shouldn't be thrown on a tangent about a tool named uv that they don't really even need to use.

Yeah my comment at #13597 (comment) will apply here as well

Using it in doc was less about install speed, and more about not having to worry about virtual environments, and whether it exists / is activated.

I could see being told to run a custom tool (uv) when you may not even know that it was part of the installed requirements to be jarring.

I'll update this PR


python vs python3 and .venv vs .venv3 in doc: I guess more of an annoyance where it'd be nice if we were consistant.

Avasam changed the title Promote usage of uv run (no more python vs python3) Allow uv run to be used without --no-project Mar 11, 2025

Avasam commented Mar 11, 2025 •
edited
Loading

Copy link
Copy Markdown
Collaborator Author

This PR is now only scoped to allowing using uv run without having to run --no-project every time.

You may have reasons to not want to modify the pyproject.toml. In which case please voice them! (even if it's just "let's wait for uv to support this"). Since I'm fine with such a change.
But please upvote astral-sh/uv#8666 in that case

Comment thread pyproject.toml Outdated
Co-authored-by: Akuli <akuviljanen17@gmail.com>
srittau merged commit 8bc9a65 into python:main Mar 12, 2025
Avasam deleted the promote-usage-of-uv-run branch March 12, 2025 13:30
mmingyu pushed a commit to mmingyu/typeshed that referenced this pull request May 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

project: infrastructure typeshed build, test, or distribution related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL