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

Use AirflowProviderDeprecationWarning in providers #30975

Merged
merged 2 commits into from
May 3, 2023

Conversation

eladkal
Copy link
Contributor

@eladkal eladkal commented Apr 30, 2023

Now that Providers minimum Airflow version is 2.4.0 we can replace DeprecationWarning with AirflowProviderDeprecationWarning


^ 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.rst or {issue_number}.significant.rst, in newsfragments.

@eladkal eladkal added the allow suspended provider changes Allow changes in suspended providers label Apr 30, 2023
Copy link
Member

@pankajastro pankajastro left a comment

Choose a reason for hiding this comment

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

does it makes sense to add a pre-commit to enforce contributor to use AirflowProviderDeprecationWarning and not DeprecationWarning in providers I feel that it would be really nice if we know in which version the deprecation is added?

@eladkal
Copy link
Contributor Author

eladkal commented May 2, 2023

does it makes sense to add a pre-commit to enforce contributor to use AirflowProviderDeprecationWarning and not DeprecationWarning in providers I feel that it would be really nice if we know in which version the deprecation is added?

See #30996

As for the 2nd question. We have that if we want to use it

class AirflowProviderDeprecationWarning(DeprecationWarning):
"""Issued for usage of deprecated features of Airflow provider."""
deprecated_provider_since: str | None = None
"Indicates the provider version that started raising this deprecation warning"

Now that Providers minimum Airflow version is 2.4.0 we can replace `DeprecationWarning` with `AirflowProviderDeprecationWarning`
@eladkal eladkal marked this pull request as ready for review May 3, 2023 12:05
@eladkal eladkal requested a review from potiuk May 3, 2023 12:05
Copy link
Member

@uranusjr uranusjr left a comment

Choose a reason for hiding this comment

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

There are some more but GitHub doesn’t allow me to add them. Those are trivial anyway and don’t strictly need to be added here.

@eladkal eladkal merged commit 0a30706 into apache:main May 3, 2023
@eladkal eladkal deleted the providers branch May 3, 2023 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
allow suspended provider changes Allow changes in suspended providers area:logging area:providers area:secrets provider:amazon AWS/Amazon - related issues provider:cncf-kubernetes Kubernetes provider related issues provider:databricks provider:docker provider:google Google (including GCP) related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants