You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "jherrmannNetfonds (via GitHub)" <gi...@apache.org> on 2026/03/03 13:09:32 UTC
Re: [D] [Question] Bundle-specific Python Path Isolation in Airflow 3.x Git Bundles [airflow]
GitHub user jherrmannNetfonds added a comment to the discussion: [Question] Bundle-specific Python Path Isolation in Airflow 3.x Git Bundles
I had the same issue and tried to fix this by modifying the python path. But the issue is that the DAG processor probes `PYTHONPATH` directories during startup before the DAG bundle git checkout finishes. Python caches those paths as empty (`None` in `sys.path_importer_cache`). The cache is never invalidated, so later imports fail even though the files are now there.
My workaround for now is to call `importlib.invalidate_caches()` in one DAG to force Python to re-scan the directories.
GitHub link: https://github.com/apache/airflow/discussions/61901#discussioncomment-15984903
----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org