dv-matthew-crown opened a new issue, #61201: URL: https://github.com/apache/airflow/issues/61201
### Apache Airflow version 3.1.6 ### If "Other Airflow 3 version" selected, which one? _No response_ ### What happened? When using Airflow connections defined from json, airflow uses [Ref](https://github.com/apache/airflow/blob/f4050b8aef22b68be81ece9d742d54d9e47b05b0/airflow-core/src/airflow/cli/commands/connection_command.py#L260): `new_conn = Connection.from_json(conn_id=args.conn_id, value=args.conn_json)` Giving a deprecated warning: `Using Connection.from_json from `airflow.models` is deprecated.Please use `from_json` on Connection from sdk(airflow.sdk.Connection) instead category=DeprecationWarning` ### What you think should happen instead? Per the deprecation warning, the import [here](https://github.com/apache/airflow/blob/f4050b8aef22b68be81ece9d742d54d9e47b05b0/airflow-core/src/airflow/cli/commands/connection_command.py#L36) should be `from airflow.sdk import Connection` ### How to reproduce Define a connection via json ### Operating System Ubuntu 24.04.3 LTS ### Versions of Apache Airflow Providers _No response_ ### Deployment Official Apache Airflow Helm Chart ### Deployment details _No response_ ### Anything else? _No response_ ### Are you willing to submit PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- 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]
