Skip to content
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

Update providers to use functools compat for cached_property #24582

Merged
merged 1 commit into from
Jun 22, 2022

Conversation

josh-fell
Copy link
Contributor

Now that all providers have a minimum Airflow version of 2.2.0, cached_property references should be replaced with airflow.compat.functools.cached_property usage. This module was introduced with 2.2.0.


^ 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 a newsfragement file, named {pr_number}.significant.rst, in newsfragments.

@boring-cyborg boring-cyborg bot added provider:cncf-kubernetes Kubernetes provider related issues area:logging area:providers area:secrets provider:amazon-aws AWS/Amazon - related issues provider:google Google (including GCP) related issues labels Jun 21, 2022
@potiuk
Copy link
Member

potiuk commented Jun 21, 2022

WOOOOHOOO! the benefits of deprecation removals :).

@josh-fell josh-fell mentioned this pull request Jun 21, 2022
@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Jun 21, 2022
@github-actions
Copy link

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.

@josh-fell josh-fell force-pushed the cached-prop-use-compat branch from b232af9 to 213889c Compare June 21, 2022 23:24
Copy link
Contributor

@blag blag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the import clean ups as well.

Comment on lines +21 to 22
from kubernetes import client, config, watch
from kubernetes.config import ConfigException
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignorable nit: kubernetes.config is kinda sorta being imported twice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah you're right. The import cleanup was a little bit me, but mostly isort. I can't take all the credit 🙂

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shhhh! Don't tell anyone :D

@josh-fell josh-fell merged commit 9c59831 into apache:main Jun 22, 2022
@josh-fell josh-fell deleted the cached-prop-use-compat branch August 29, 2022 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:logging area:providers area:secrets okay to merge It's ok to merge this PR as it does not require more tests provider:amazon-aws AWS/Amazon - related issues provider:cncf-kubernetes Kubernetes provider related issues provider:google Google (including GCP) related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants