Uh oh!
There was an error while loading. Please reload this page.
Always use Literal from typing_extensions - #33794
Conversation
There was a problem hiding this comment.
TypeGuard also presented in our airflow.typing_compat so we might want to use two imports here:
fromtyping_extensionsimportLiteralfromairflow.typing_compatimportTypeGuarded9d450 to
cc1ffc2Comparecc1ffc2 to
7fec822CompareTaragolis
commented
Aug 27, 2023
I hope I've finally finish rebasing and resolve conflicts 🤣 |
hussein-awala
commented
Aug 27, 2023
I will wait your PR before merging the other PRs |
Taragolis
commented
Aug 27, 2023
No problem, that was just funny. |
hussein-awala
commented
Aug 27, 2023
Flaky test, you can merge it if there is nothing to change. |
uranusjr
commented
Aug 28, 2023
Why is typing_extension used unconditionally instead of only for 3.10.1+ (or more conveniently just 3.11+)? |
Taragolis
commented
Aug 28, 2023
For provider just for do not write something this condition everywhere, seem like we save to use until we can get rid of it. For core, maybe here we should use such condition, and I was merge before got additional review comments 😞 |
uranusjr
commented
Aug 28, 2023
Should I do that? (Asking in case you’re already doing it) |
Taragolis
commented
Aug 28, 2023
I could do that. |
During the removing support of Python 3.7 #30963, we incidentally create this block
This PR fix by use everywhere
from typing_extension import Literalinstead offrom typing import Literalfrom airflow.typing_compat import LiteralIn additional
Literalhas other known bugs which finally resolved in Python 3.10.1+, so personally I thought that better just usefrom typing_extension import Literalrather than outairflow.typing_compatresolver^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.