harrold-mussa opened a new pull request, #60084: URL: https://github.com/apache/airflow/pull/60084
This PR addresses the issue #59900, which is part of the larger effort (#59895) to make `sqlalchemy` an optional dependency for providers. This change supports the upcoming Task Isolation features in Airflow 3.0. closes: #59900 related: #59895 ### Changes: - **provider.yaml**: Moved `sqlalchemy` from main dependencies to `additional-extras`. - **hooks/databricks_sql.py**: Refactored `sqlalchemy_url` to use a lazy-loading import and raise `AirflowOptionalProviderFeatureException` if sqlalchemy is missing. - **plugins/databricks_workflow.py**: Implemented module-level `__getattr__` to handle lazy imports for `select` and `Session`. ### Validation: - Verified with `pytest providers/databricks/tests/unit/databricks/hooks/test_databricks_sql.py` (All 34 tests passed 😄 ). - Verified `provider.yaml` validity with pre-commit hooks. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
