potiuk commented on pull request #20031: URL: https://github.com/apache/airflow/pull/20031#issuecomment-996591074
It actually detected a mistake :). It's about the stack_level and the fact that it is imported through another module. The warning is generated one level deeper than other warnings and stack_level must be set to 3, otherwise the generated warning will not show the origin of the import. As you can see here: https://github.com/apache/airflow/runs/4555876546?check_suite_focus=true#step:6:385 all the warnings are showing "importlib" as the import location but the new warning shows kubernetes_pod as the source: ```` /opt/airflow/airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py:46: This module is deprecated. Please use `kubernetes.client.models.V1EnvVar`. /usr/local/lib/python3.7/importlib/__init__.py:127: This module is deprecated. Please use `airflow.providers.amazon.aws.hooks.dynamodb`. /usr/local/lib/python3.7/importlib/__init__.py:127: This module is deprecated. Please use `airflow.hooks.redshift_sql` or `airflow.hooks.redshift_cluster` as appropriate. ``` -- 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]
