-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
bugSomething isn't workingSomething isn't workingwindowsSpecific to the Windows platformSpecific to the Windows platform
Description
Summary
When using uv run or uv tool run to run a script from [project.gui-scripts] in pyproject.toml, 3 popup messages are displayed before the script is started:
- "Making stdin inheritable failed"
- "Making stdout inheritable failed"
- "Making stderr inheritable failed"
This is regardless of whether the script is doing anything GUI related or not.
To reproduce
Preparation:
uv init --app --package foo- In
pyproject.toml, replace[project.scripts]with[project.gui-scripts]
Issue demonstration, in foo/:
uv run foo→ popup messagesuv tool run --from . foo→ popup messages
On the other hand, this works as expected:
.venv\Scripts\foo.exe→ no popupsuv tool install . & foo→ no popups
Output from uv --verbose run foo:
Output
DEBUG uv 0.5.20 (1c17662b3 2025-01-15)
DEBUG Found project root: `c:\Users\[...]\foo`
DEBUG No workspace root found, using project root
DEBUG Discovered project `foo` at: c:\Users\[...]\foo
DEBUG Reading Python requests from version file at `c:\Users\[...]\foo\.python-version`
DEBUG Using Python request `3.13` from version file at `.python-version`
DEBUG The virtual environment's Python version satisfies `3.13`
DEBUG Using request timeout of 30s
DEBUG Found static `pyproject.toml` for: foo @ file:///C:/Users/[...]/foo
DEBUG No workspace root found, using project root
DEBUG Existing `uv.lock` satisfies workspace requirements
Resolved 1 package in 10ms
DEBUG Using request timeout of 30s
DEBUG Requirement already installed: foo==0.1.0 (from file:///C:/Users/[...]/foo)
Audited 1 package in 0.49ms
DEBUG Using Python 3.13.1 interpreter at: C:\Users\[...]\foo\.venv\Scripts\python.exe
DEBUG Running `foo`
DEBUG Command exited with code: 0
Additional information
For scripts in [project.scripts] (as opposed to [project.gui-scripts]), this does not happen.
The message seems to be generated by the spawn_child function in uv-trampoline's bounce.rs.
Redirecting the output changes the behavior slightly:
uv run foo >1.txt→ popups only for "stdin" and "stderr", output offooin1.txtuv run foo 2>2.txt→ no popups, messages written to2.txtinstead
Versions
Windows 11 Version 23H2 (Build 22631.4460)
uv 0.5.20 (1c17662 2025-01-15)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingwindowsSpecific to the Windows platformSpecific to the Windows platform