eladkal commented on pull request #19857:
URL: https://github.com/apache/airflow/pull/19857#issuecomment-1069533737
@dstandish example:
```
from datetime import datetime
from airflow import DAG
from airflow.operators.python import PythonOperator
from airflow.providers.amazon.aws.hooks.s3 import S3Hook
default_args = {
'start_date': datetime(2022, 3, 15),
'owner': 'airflow',
'retries': 1
}
def test_hook():
s3_hook = S3Hook()
s3_hook.load_file(filename='bla', key='blaa', bucket_name='fff')
dag = DAG(dag_id='my_dag', default_args=default_args)
py_test = PythonOperator(task_id='python_task', python_callable=test_hook,
dag=dag)
```
It produce the warning (some other unrelated warnings as well):
```
[2022-03-16, 19:26:09 UTC] {logging_mixin.py:115} WARNING -
/opt/***/***/secrets/base_secrets.py:95 PendingDeprecationWarning: This method
is deprecated. Please use
`***.secrets.environment_variables.EnvironmentVariablesBackend.get_conn_value`.
[2022-03-16, 19:26:09 UTC] {logging_mixin.py:115} WARNING -
/opt/***/***/models/connection.py:420 PendingDeprecationWarning: Method
`get_conn_uri` is deprecated. Please use `get_conn_value`.
[2022-03-16, 19:26:11 UTC] {logging_mixin.py:115} WARNING -
/opt/***/***/models/dag.py:1084 SADeprecationWarning: Query.value() is
deprecated and will be removed in a future release. Please use
Query.with_entities() in combination with Query.scalar() (deprecated since: 1.4)
```
--
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]