Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
from airflow.providers.openlineage.version_compat import AIRFLOW_V_2_10_PLUS, AIRFLOW_V_3_0_PLUS
from airflow.sensors.base import BaseSensorOperator
from airflow.serialization.serialized_objects import SerializedBaseOperator
from airflow.utils.context import AirflowContextDeprecationWarning
from airflow.utils.module_loading import import_string
from airflow.utils.session import NEW_SESSION, provide_session
from openlineage.client.utils import RedactMixin
Expand Down Expand Up @@ -640,6 +639,13 @@ def from_masker(cls, other: SecretsMasker) -> OpenLineageRedactor:
return instance

def _redact(self, item: Redactable, name: str | None, depth: int, max_depth: int) -> Redacted:
if AIRFLOW_V_3_0_PLUS:
# Keep compatibility for Airflow 2.x, remove when Airflow 3.0 is the minimum version
class AirflowContextDeprecationWarning(UserWarning):
pass
else:
from airflow.utils.context import AirflowContextDeprecationWarning

if depth > max_depth:
return item
try:
Expand Down
Loading