frankcash commented on a change in pull request #21567:
URL: https://github.com/apache/airflow/pull/21567#discussion_r806274029



##########
File path: airflow/providers/amazon/aws/sensors/sqs.py
##########
@@ -21,11 +21,11 @@
 from typing import TYPE_CHECKING, Any, Optional, Sequence
 
 from jsonpath_ng import parse
-from typing_extensions import Literal
 
 from airflow.exceptions import AirflowException
 from airflow.providers.amazon.aws.hooks.sqs import SqsHook
 from airflow.sensors.base import BaseSensorOperator
+from airflow.typing_compat import Literal

Review comment:
       Minimum version appears to be 2.1.0 
https://github.com/apache/airflow/blob/main/airflow/providers/amazon/provider.yaml#L40
   
   

##########
File path: airflow/providers/amazon/aws/sensors/sqs.py
##########
@@ -21,11 +21,11 @@
 from typing import TYPE_CHECKING, Any, Optional, Sequence
 
 from jsonpath_ng import parse
-from typing_extensions import Literal
 
 from airflow.exceptions import AirflowException
 from airflow.providers.amazon.aws.hooks.sqs import SqsHook
 from airflow.sensors.base import BaseSensorOperator
+from airflow.typing_compat import Literal

Review comment:
       Minimum version appears to be 2.1.0  for the provider 
https://github.com/apache/airflow/blob/main/airflow/providers/amazon/provider.yaml#L40
   
   

##########
File path: airflow/providers/amazon/aws/sensors/sqs.py
##########
@@ -21,11 +21,11 @@
 from typing import TYPE_CHECKING, Any, Optional, Sequence
 
 from jsonpath_ng import parse
-from typing_extensions import Literal
 
 from airflow.exceptions import AirflowException
 from airflow.providers.amazon.aws.hooks.sqs import SqsHook
 from airflow.sensors.base import BaseSensorOperator
+from airflow.typing_compat import Literal

Review comment:
       Sounds good, thanks for the feedback. Is there a preferred way I should 
go about solving this @potiuk ?

##########
File path: airflow/providers/amazon/aws/sensors/sqs.py
##########
@@ -21,11 +21,11 @@
 from typing import TYPE_CHECKING, Any, Optional, Sequence
 
 from jsonpath_ng import parse
-from typing_extensions import Literal
 
 from airflow.exceptions import AirflowException
 from airflow.providers.amazon.aws.hooks.sqs import SqsHook
 from airflow.sensors.base import BaseSensorOperator
+from airflow.typing_compat import Literal

Review comment:
       As @uranusjr pointed out we could change the line in setup.cfg that 
doesn't install the lib if on python 3.8+ 

##########
File path: airflow/providers/amazon/aws/sensors/sqs.py
##########
@@ -21,11 +21,11 @@
 from typing import TYPE_CHECKING, Any, Optional, Sequence
 
 from jsonpath_ng import parse
-from typing_extensions import Literal
 
 from airflow.exceptions import AirflowException
 from airflow.providers.amazon.aws.hooks.sqs import SqsHook
 from airflow.sensors.base import BaseSensorOperator
+from airflow.typing_compat import Literal

Review comment:
       As @uranusjr pointed out we could change the line in setup.cfg that 
doesn't install the lib if on python 3.8+ 
   
   I included that as a potential fix in the issue 
https://github.com/apache/airflow/issues/21566#issuecomment-1039537580

##########
File path: setup.cfg
##########
@@ -137,7 +137,7 @@ install_requires =
     tabulate>=0.7.5, <0.9
     tenacity>=6.2.0
     termcolor>=1.1.0
-    typing-extensions>=3.7.4;python_version<"3.8"

Review comment:
       Addressed in latest commit 




-- 
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]


Reply via email to