The GitHub Actions job "Tests" on 
airflow.git/2603/fix-connection-circular-import has succeeded.
Run started by GitHub user Dev-iL (triggered by Dev-iL).

Head commit for run:
76db41cacf0acdbf0b80dea2efd0bbe3f3c8f289 / Dev-iL 
<[email protected]>
Remove module-level import from `airflow.configuration`

Importing airflow.models.Connection pulled in airflow.configuration, and 
airflow.configuration initializes secrets backends at import time. That 
initialization itself does `from airflow.models import Connection`, so under 
Python 3.14 the lazy import path could re-enter `airflow.models.__getattr__ 
before connection.py` had finished defining the Connection class. The result 
was the ImportError: Module "airflow.models.connection" does not define a 
"Connection"; plus repeated SQLAlchemy warnings about redefining the model 
during partial imports. By deferring: `from airflow.configuration import conf, 
ensure_secrets_loaded` until the method actually needs them, importing the 
module no longer triggers that cycle. `Connection` gets fully defined first, 
and only later, when get_connection_from_secrets() runs, do we touch 
configuration and secrets loading. That keeps behavior the same at runtime, but 
removes the import-time recursion.

Report URL: https://github.com/apache/airflow/actions/runs/23183563248

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to