PY-82666 Fix undetached process cancellation when running packaging tool

Pip packaging tool used legacy process handler, which led to undetached
processes being spawned and even process leaks if they are really long
running. This led to flaky tests that were trying to delete temporary
directories after the test was finished, and at the same time process
was still running and creating __pycache__ directories there. That's
where a DirectoryNotEmptyException was thrown leading to a test failure.

The whole problem was fixed by using a new ExecService instead of a
legacy process handler. Also unused register keys `python.packaging.tool.use.project.location.as.working.dir` and `python.packaging.tool.upload.project` have been removed.


Merge-request: IJ-MR-176080
Merged-by: Alexey Katsman <alexey.katsman@jetbrains.com>

GitOrigin-RevId: 31c02fc8c25abd5941518958e7e2651f3771bad1
This commit is contained in:
Alexey Katsman
2025-10-05 17:18:24 +00:00
committed by intellij-monorepo-bot
parent 94c624aae7
commit 0c509dbb23
6 changed files with 19 additions and 174 deletions
@@ -572,10 +572,6 @@
<!-- Targets API -->
<registryKey key="enable.conda.on.targets" defaultValue="false" description="Enables Conda configuration on targets."/>
<registryKey key="python.packaging.tool.use.project.location.as.working.dir" defaultValue="false"
description="Use project location as a working directory for the packaging tool execution."/>
<registryKey key="python.packaging.tool.upload.project" defaultValue="false"
description="Upload project files and use this location as a working directory for the packaging tool execution."/>
<notificationGroup id="Python Debugger" displayType="TOOL_WINDOW" toolWindowId="Debug" bundle="messages.PyBundle"
key="debug.notification.group"/>