You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2025/08/23 13:18:15 UTC
(airflow) branch main updated: Point deprecation warning in Connection method to specific alternatives (#54868)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 21a1450fc54 Point deprecation warning in Connection method to specific alternatives (#54868)
21a1450fc54 is described below
commit 21a1450fc54ea3e7924824524486da93f3144d81
Author: Amogh Desai <am...@gmail.com>
AuthorDate: Sat Aug 23 18:48:08 2025 +0530
Point deprecation warning in Connection method to specific alternatives (#54868)
---
airflow-core/src/airflow/models/connection.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/airflow-core/src/airflow/models/connection.py b/airflow-core/src/airflow/models/connection.py
index 16fe85adcdd..d71c1891b4d 100644
--- a/airflow-core/src/airflow/models/connection.py
+++ b/airflow-core/src/airflow/models/connection.py
@@ -479,7 +479,7 @@ class Connection(Base, LoggingMixin):
warnings.warn(
"Using Connection.get_connection_from_secrets from `airflow.models` is deprecated."
- "Please use `from airflow.sdk import Connection` instead",
+ "Please use `get` on Connection from sdk(`airflow.sdk.Connection`) instead",
DeprecationWarning,
stacklevel=1,
)
@@ -555,7 +555,7 @@ class Connection(Base, LoggingMixin):
warnings.warn(
"Using Connection.from_json from `airflow.models` is deprecated."
- "Please use `from airflow.sdk import Connection` instead",
+ "Please use `from_json` on Connection from sdk(airflow.sdk.Connection) instead",
DeprecationWarning,
stacklevel=1,
)