Skip to content

Work around Tox hanging with --installpkg sdist due to orphaned build backend #3530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/tox/tox_env/python/virtual_env/package/pyproject.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,15 @@ def root(self) -> Path:

@root.setter
def root(self, value: Path) -> None:
self._root = value
self._frontend_ = None # force recreating the frontend with new root
# NOTE(vytas): Recreating the frontend with a new root will orphan the
# current frontend.backend_executor, if any, making tox hang upon
# exit waiting for its threads and subprocesses (#3512).
#
# Here, we partially work around the issue by only resetting the root
# when it has actually changed:
if self._root != value:
self._root = value
self._frontend_ = None # force recreating the frontend with new root

@staticmethod
def id() -> str:
Expand Down