-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore handling logic for importlib_metadata (mypy, tests/plugins) #20049
Conversation
importlib_metadata_string = 'importlib_metadata' | ||
|
||
try: | ||
if sys.version_info[:2] >= (3, 8): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we have PY38 constant for that in `airflow': @khalidmammadov .
Also @ashb - I recall discussions we had about it, I think it makes sense to based it on Python version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, someone (i forget who, maybe Martjin Peiters? sp?) recommended the approach TP says -- always try the third part first, as that API is stable and predictable.)
The problem is that If we want to change try-imports to if-imports, it’s probably better to always use Also I believe |
That would explain some of the behaviours seen before :) |
I will revert and try to fix MyPy issues different way |
ed9d808
to
c768bf2
Compare
c768bf2
to
6844276
Compare
@khalidmammadov Please read https://cbea.ms/git-commit/ (linked to from our contributing guide) and try to give more useful commit messages in future. |
Do you mean commit message or PR description/title? |
Part of #19891
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, 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 UPDATING.md.