Fix CI: Clear Python bytecode cache before reinstall

The real issue was stale .pyc bytecode files in __pycache__ directories.
These cached files contained the old method signatures without the
authorization parameter, causing signature mismatch errors even though
the source .py files were correct.

Now clearing all __pycache__ directories and .pyc files before the
force-reinstall to ensure Python loads fresh bytecode from the updated
source files.
This commit is contained in:
Omar Abdelwahab 2025-11-12 15:16:34 -08:00
parent 025c301a9a
commit 1ea57b0a17

View file

@ -37,6 +37,10 @@ runs:
echo "Exported UV environment variables for current and subsequent steps"
fi
echo "Clearing Python bytecode cache to avoid stale .pyc files"
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find . -name "*.pyc" -delete 2>/dev/null || true
echo "Updating project dependencies via uv sync"
uv sync --all-groups