-
-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Description
tox-gh fails with AttributeError: '_thread._local' object has no attribute 'installing' when using uv-venv-lock-runner.
Root Cause
uv-venv-lock-runner uses uv sync directly and bypasses the tox_on_install hook, so _STATE.installing is never set. The strict assertion in tox_before_run_commands then fails:
assert _STATE.installing # This failsProposed Fix
Replace the assertion with a defensive check:
installing = getattr(_STATE, "installing", False)
if installing:
_STATE.installing = False
print("::endgroup::")This supports both traditional runners (that call tox_on_install) and lock-based runners (that don't).
Related
- Similar issue fixed in tox-uv: Make sure
tox_on_install()hook is called inUvVenvLockRunner._setup_env()tox-uv#241
Metadata
Metadata
Assignees
Labels
No labels