Skip to content

Commit bdc2bc2

Browse files
committed
Fix Tox hanging with --installpkg sdist due to orphaned build backend.
1 parent b770ed5 commit bdc2bc2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/tox/tox_env/python/virtual_env/package/pyproject.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,15 @@ def root(self) -> Path:
118118

119119
@root.setter
120120
def root(self, value: Path) -> None:
121-
self._root = value
122-
self._frontend_ = None # force recreating the frontend with new root
121+
# NOTE(vytas): Recreating the frontend with a new root will orphan the
122+
# current frontend.backend_executor, if any, making tox hang upon
123+
# exit waiting for its threads and subprocesses (#3512).
124+
#
125+
# Here, we partially worka round the issue by only resetting the root
126+
# when it has actually changed:
127+
if self._root != value:
128+
self._root = value
129+
self._frontend_ = None # force recreating the frontend with new root
123130

124131
@staticmethod
125132
def id() -> str:

0 commit comments

Comments
 (0)