You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
restart_on: a folder pattern fires when Python creates __pycache__ in it #463
A dev server (kind = "devserver") of a Python service with a folder in restart_on:
restart_on = ["shared", "api"]
restarts once or twice right after devstack up, without any edit. The first start of the Python process creates __pycache__/ folders in the imported packages, and the daemon log reports the parent folders as changed:
The services in the same stack that import those packages all restart once; a job they wait for (after) runs again too.
Expected
The stack file reference says generated directories, __pycache__ among them, "never count as changes". Creating one should not count as a change of the folder that holds it, so a folder pattern in restart_on stays quiet.
Workaround
Name file types instead of the folder: restart_on = ["shared/**/*.py", "api/**/*.py"] (or set PYTHONDONTWRITEBYTECODE=1).
Environment
devstack 0.40.0, Windows 11, Python 3.12 (uv venv), main working tree.
Activity
fix: a folder's own "modified" event is no change; __pycache__ restar…
fix: a folder's own "modified" event is no change; __pycache__ restar…