potiuk commented on a change in pull request #21567:
URL: https://github.com/apache/airflow/pull/21567#discussion_r806684159
##########
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:
Then we can't use it, I am afraid.
##########
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:
The eror is clear about it
https://github.com/apache/airflow/runs/5191554253?check_suite_focus=true
##########
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:
I am for this solution as well:
```
typing-extensions>=3.7.4;python_version<"3.8"
```
##########
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:
I think we should add a comment here that we can remove this dependency
when one of two things happen:
1) We drop Pyhon 3.7
2) We add min airflow version for all providers to be 2.2 - in which case we
can replace it with compat.
##########
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:
BTW. The 2. might happen in a few months, so it's good to note it to
remember and remove it eventually.
--
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]