-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[airflow]: extend removed names (AIR302) #14734
[airflow]: extend removed names (AIR302) #14734
Conversation
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
AIR302 | 2 | 1 | 1 | 0 | 0 |
["airflow", "utils", "decorators", "apply_defaults"] => { | ||
Some((qualname.to_string(), Replacement::None)) | ||
} |
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.
We should mention this can be safely removed (apply_defaults
is now unconditionally done). It’s probably easier if we add a variant to Replacement (called Message maybe) and do
Replacement::Message(message) => {
format!("`{deprecated}` is removed in Airflow 3.0; {message}")
}
in impl Violation
.
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.
Yep, we'll need something similar for AIR303 and AIR304 as well. or we could probably use this for those 2 🤔
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.
This is temporarily removed, but will be added back (probably in the next PR I think?)
* airflow.metrics.validators.AllowListValidator * airflow.metrics.validators.BlockListValidator * airflow.utils.dates.parse_execution_date * airflow.utils.dates.round_time * airflow.utils.dates.scale_time_units * airflow.utils.dates.infer_time_unit * airflow.utils.file.TemporaryDirectory * airflow.utils.file.mkdirs * airflow.www.auth.has_access * airflow.api_connexion.security.requires_access * airflow.utils.dag_cycle_tester.test_cycle * airflow.utils.state.SHUTDOWN * airflow.utils.state.terminating_states
d37fbad
to
897ac7f
Compare
* main: [red-knot] Test: Hashable/Sized => A/B (#14769) [`flake8-type-checking`] Expands TC006 docs to better explain itself (#14749) [`pycodestyle`] Handle f-strings properly for `invalid-escape-sequence (W605)` (#14748) [red-knot] Add fuzzer to catch panics for invalid syntax (#14678) Check `AIR001` from builtin or providers `operators` module (#14631) [airflow]: extend removed names (AIR302) (#14734)
Summary
Airflow 3.0 removes various deprecated functions, members, modules, and other values. They have been deprecated in 2.x, but the removal causes incompatibilities that we want to detect. This PR deprecates the following names.
The full list of names we will extend apache/airflow#44556
Test Plan
A test fixture is included in the PR.