dimon222 commented on a change in pull request #19726:
URL: https://github.com/apache/airflow/pull/19726#discussion_r763440603



##########
File path: 
airflow/providers/cncf/kubernetes/backcompat/backwards_compat_converters.py
##########
@@ -21,18 +21,16 @@
 from kubernetes.client import ApiClient, models as k8s
 
 from airflow.exceptions import AirflowException
-from airflow.providers.cncf.kubernetes.backcompat.pod import Port, Resources
-from airflow.providers.cncf.kubernetes.backcompat.pod_runtime_info_env import 
PodRuntimeInfoEnv
 
 
-def _convert_kube_model_object(obj, old_class, new_class):
+def _convert_kube_model_object(obj, old_class_name, new_class):

Review comment:
       I've applied alternative approach in separate PR - it will show warnings 
only if user imports the class in **his** code:
   https://github.com/apache/airflow/pull/20031
   This specific modification we do here in current PR is to actually stop 
printing deprecation when everything is GOOD (right now it will print it 
always, even if we don't use old classes - just because of how project was 
structured)
   
   PS: however, I see no problem if we keep adding extra in this code, as 
entire compat will be gone at some point




-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to