pulumi/sdk/python/toolchain
Julien efb38baee4
Fix hang on error when using uv on Windows (#18054)
When using uv we were running Python as `uv run python`, since that
conveniently
handles the virtualenv for us. This results in a process tree of
`python-language-runtime -> uv -> python`. This is problematic because
on error
we kill the plugin and its children, but not the children of the
children. On
macOS and Linux, when uv is killed, it kills its children, so we have no
problem
here. On Windows however, it does not, and we end up with an orphaned
Python
process that's busy-waiting in the eventloop and never exits.

To avoid this issue, we run Python the same way as we do when using
Poetry or Pip.

Fixes https://github.com/pulumi/pulumi/issues/17877
2024-12-16 18:14:20 +00:00
..
pip.go Fix hang on error when using uv on Windows (#18054) 2024-12-16 18:14:20 +00:00
pip_test.go Add VIRTUAL_ENV to env var when running in a venv (#16425) 2024-06-20 10:26:49 +00:00
poetry.go Drop Python 3.8 support (#17883) 2024-12-02 16:13:08 +00:00
poetry_test.go Drop Python 3.8 support (#17883) 2024-12-02 16:13:08 +00:00
shim_unix.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
shim_windows.go [Python] Move existing dependency installation and python command invocation to a Toolchain interface (#16243) 2024-06-03 13:52:27 +00:00
toolchain.go Fix hang on error when using uv on Windows (#18054) 2024-12-16 18:14:20 +00:00
toolchain_test.go Add Uv as a Python toolchain (#17609) 2024-11-07 16:26:22 +00:00
uv.go Fix hang on error when using uv on Windows (#18054) 2024-12-16 18:14:20 +00:00
uv_test.go Don't recreate virtualenvs when using venv (#17892) 2024-12-02 16:22:31 +00:00