Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Test Cases - Deprecations Verification

Test ID

Module

Old Path

New Path

Test Description

Expected Result

TC_UTILS_001

airflow.utils

airflow

## airflow.utils module deprecations

...

.utils.setup_teardown.

...

BaseSetupTeardownContext

airflow.sdk.definitions._internal.setup_teardown

...

.BaseSetupTeardownContext

Import old path and verify DeprecationWarning; import new path and verify class is accessible

Old path raises DeprecationWarning, new path works without warning

TC_UTILS_002

airflow.utils

airflow.utils.setup_teardown.

...

SetupTeardownContext

airflow.sdk.definitions._internal.setup_teardown.

...

SetupTeardownContext

Import old path and verify DeprecationWarning; import new path and verify class is accessible

Old path raises DeprecationWarning, new path works without warning

TC_UTILS_003

airflow.utils

airflow.utils.xcom.XCOM_RETURN_

...

KEY

airflow.models.xcom.XCOM_RETURN

...

_KEY

Import constant from old path and verify DeprecationWarning; check constant value matches new path

Old path raises DeprecationWarning, constant values match

TC_UTILS_004

airflow.utils

airflow.utils.task_group.

...

TaskGroup

airflow.sdk.TaskGroup

Import TaskGroup from old path and verify DeprecationWarning; import from new path and check type

Old path raises DeprecationWarning, new path works without warning

TC_UTILS_005

airflow.utils

airflow.utils.task_group.get_task_group_children_

...

getter

airflow.sdk.definitions.taskgroup.get_task_group_children

...

_getter

Import function from old path and verify DeprecationWarning; compare with new path

Old path raises DeprecationWarning, functions match

TC_UTILS_006

airflow.utils

airflow.utils.task_group.task_group_to_

...

dict

airflow.sdk.definitions.taskgroup.task_group_to_

...

dict

Import from old path and verify DeprecationWarning; function output matches new path

Old path raises DeprecationWarning, outputs match

TC_UTILS_007

airflow.utils

airflow.utils.timezone.*

...

airflow.sdk.timezone

Import timezone submodule from old path and verify DeprecationWarning; compare function outputs with new path

Old path raises DeprecationWarning, outputs match

TC_UTILS_008

airflow.utils

airflow.utils.decorators.remove_task_

...

decorator

airflow.sdk.definitions._internal.decorators.remove_task_

...

decorator

Import from old path and verify DeprecationWarning; function matches new path

Old path raises DeprecationWarning, outputs match

TC_UTILS_009

airflow.utils

airflow.utils.decorators.fixup_decorator_warning_

...

stack

airflow.sdk.definitions._internal.decorators.fixup_decorator_warning_

...

## airflow.sensors module deprecations

...

stack

Import from old path and verify DeprecationWarning; compare function reference to new path

Old path raises DeprecationWarning, references match


Test ID

Module

Old Path

New Path

Test Description

Expected Result

TC_SENSORS_001

airflow.sensors

airflow.sensors.base.BaseSensorOperator

airflow.sdk.bases.sensor.

...

BaseSensorOperator

Import old path and verify DeprecationWarning; import new path and verify class is accessible

Old path raises DeprecationWarning, new path works without warning

TC_SENSORS_002

airflow.sensors

airflow.sensors.base.

...

PokeReturnValue

airflow.sdk.bases.sensor.

...

PokeReturnValue

Import from old path and verify DeprecationWarning; compare with new path

Old path raises DeprecationWarning, values match

TC_SENSORS_003

airflow.sensors

airflow.sensors.base.poke_mode_

...

only

airflow.sdk.bases.sensor.poke_mode_

...

only

Import function from old path and verify DeprecationWarning; compare with new path

Old path raises DeprecationWarning, function matches

TC_SENSORS_004

airflow.sensors

airflow.sensors.python.

...

PythonSensor

airflow.providers.standard.sensors.python.

...

PythonSensor

Import from old path and verify DeprecationWarning; import new path and check type

Old path raises DeprecationWarning, new path works

TC_SENSORS_005

airflow.sensors

airflow.sensors.bash.

...

BashSensor

airflow.providers.standard.sensors.bash

...

.BashSensor

Import from old path and verify DeprecationWarning; import new path and check type

Old path raises DeprecationWarning, new path works

TC_SENSORS_006

airflow.sensors

airflow.sensors.date_time.

...

DateTimeSensor

airflow.providers.standard.sensors.date_time.

...

DateTimeSensor

Import old path and verify DeprecationWarning; import new path and check type

Old path raises DeprecationWarning, new path works

TC_SENSORS_007

airflow.sensors

airflow.sensors.date_time.

...

DateTimeSensorAsync

airflow.providers.standard.sensors.date_time.

...

DateTimeSensorAsync

Import old path and verify DeprecationWarning; import new path and check type

Old path raises DeprecationWarning, new path works

TC_SENSORS_008

airflow.sensors

airflow.sensors.time_sensor.

...

TimeSensor

airflow.providers.standard.sensors.time

...

.TimeSensor

Import old path and verify DeprecationWarning; import new path and check type

Old path raises DeprecationWarning, new path works

TC_SENSORS_009

airflow.sensors

airflow.sensors.time_sensor.

...

TimeSensorAsync

airflow.providers.standard.sensors.time.

...

TimeSensorAsync

Import old path and verify DeprecationWarning; import new path and check type

Old path raises DeprecationWarning, new path works

TC_SENSORS_010

airflow.sensors

airflow.sensors.weekday.

...

DayOfWeekSensor

airflow.providers.standard.sensors.weekday

...

.DayOfWeekSensor

Import old path and verify DeprecationWarning; import new path and check type

Old path raises DeprecationWarning, new path works

TC_SENSORS_011

airflow.sensors

airflow.sensors.time_delta.

...

TimeDeltaSensor

airflow.providers.standard.sensors.time_delta.

...

TimeDeltaSensor

Import old path and verify DeprecationWarning; import new path and check type

Old path raises DeprecationWarning, new path works

TC_SENSORS_012

airflow.sensors

airflow.sensors.time_delta.

...

TimeDeltaSensorAsync

airflow.providers.standard.sensors.time_delta

...

.TimeDeltaSensorAsync

Import old path and verify DeprecationWarning; import new path and check type

Old path raises DeprecationWarning, new path works

TC_SENSORS_013

airflow.sensors

airflow.sensors.filesystem.

...

FileSensor

airflow.providers.standard.sensors.filesystem

...

.FileSensor

Import old path and verify DeprecationWarning; import new path and check type

Old path raises DeprecationWarning, new path works

TC_SENSORS_014

airflow.sensors

airflow.sensors.external_task.

...

ExternalTaskSensor

airflow.providers.standard.sensors.external_task

...

.ExternalTaskSensor

Import old path and verify DeprecationWarning; import new path and check type

Old path raises DeprecationWarning, new path works

TC_SENSORS_015

airflow.sensors

airflow.sensors.external_task.

...

ExternalTaskMarker

airflow.providers.standard.sensors.external_task

...

.ExternalTaskMarker

Import old path and verify DeprecationWarning; import new path and check type

Old path raises DeprecationWarning, new path works

TC_SENSORS_016

airflow.sensors

airflow.sensors.external_task.

...

ExternalDagLink

airflow.providers.standard.sensors.external_task.

...

ExternalDagLink

Import old path and verify DeprecationWarning; import new path and check type

Old path raises DeprecationWarning, new path works


Test ID

Module

Old Path

New Path

Test Description

Expected Result

TC_SECRETS_001

airflow.secrets

airflow.secrets.base.BaseSecretsBackend

airflow.sdk.bases.secrets.BaseSecretsBackend

Import from old path and verify DeprecationWarning; import from new path and check type

Old path raises DeprecationWarning, new path works without warning

TC_SECRETS_002

airflow.secrets

airflow.secrets.local_filesystem.LocalFilesystemBackend

airflow.providers.standard.secrets.local_filesystem.LocalFilesystemBackend

Import from old path and verify DeprecationWarning; new path works

Old path raises DeprecationWarning, new path works

TC_SECRETS_003

airflow.secrets

airflow.secrets.environment_variables.EnvironmentVariablesBackend

airflow.providers.standard.secrets.environment_variables.EnvironmentVariablesBackend

Import from old path and verify DeprecationWarning; new path works

Old path raises DeprecationWarning, new path works


Test ID

Module

Old Path

New Path

Test Description

Expected Result

TC_NOTIFICATIONS_001

airflow.notifications

airflow.notifications.basenotifier.BaseNotifier

airflow.sdk.bases.notifier.BaseNotifier

Import from old path and verify DeprecationWarning; import from new path and check type

Old path raises DeprecationWarning, new path works

TC_NOTIFICATIONS_002

airflow.notifications

airflow.notifications.email.EmailNotifier

airflow.providers.standard.notifications.email.EmailNotifier

Import from old path and verify DeprecationWarning; new path works

Old path raises DeprecationWarning, new path works


Test ID

Module

Old Path

New Path

Test Description

Expected Result

TC_MODELS_001

airflow.models

airflow.models.baseoperator.BaseOperator

airflow.sdk.bases.operator.BaseOperator

Import from old path and verify DeprecationWarning; new path works

Old path raises DeprecationWarning, new path works

TC_MODELS_002

airflow.models

airflow.models.dag.DAG

airflow.sdk.DAG

Import from old path and verify DeprecationWarning; new path works

Old path raises DeprecationWarning, new path works

TC_MODELS_003

airflow.models

airflow.models.dagdagrun.DagRun

airflow.sdk.DagRun

Import from old path and verify DeprecationWarning; new path works

Old path raises DeprecationWarning, new path works

TC_MODELS_004

airflow.models

airflow.models.param.Param

airflow.sdk.Param

Import from old path and verify DeprecationWarning; new path works

Old path raises DeprecationWarning, new path works


Test ID

Module

Old Path

New Path

Test Description

Expected Result

TC_MACROS_001

airflow.macros

airflow.macros.datetime

airflow.sdk.macros.datetime

Import from old path and verify DeprecationWarning; outputs match new path

Old path raises DeprecationWarning, outputs match

TC_MACROS_002

airflow.macros

airflow.macros.hive

airflow.sdk.macros.hive

Import from old path and verify DeprecationWarning; outputs match new path

Old path raises DeprecationWarning, outputs match


Test ID

Module

Old Path

New Path

Test Description

Expected Result

TC_IO_001

airflow.io

airflow.io.fs.File

airflow.sdk.io.fs.File

Import from old path and verify DeprecationWarning; new path works

Old path raises DeprecationWarning, new path works


Test ID

Module

Old Path

New Path

Test Description

Expected Result

TC_HOOKS_001

airflow.hooks

airflow.hooks.base.BaseHook

airflow.sdk.bases.hook.BaseHook

Import from old path and verify DeprecationWarning; new path works

Old path raises DeprecationWarning, new path works

TC_HOOKS_002

airflow.hooks

airflow.hooks.dbapi.DbApiHook

airflow.sdk.bases.hook.DbApiHook

Import from old path and verify DeprecationWarning; new path works

Old path raises DeprecationWarning, new path works


Test ID

Module

Old Path

New Path

Test Description

Expected Result

TC_DECORATORS_001

airflow.decorators

airflow.decorators.task

airflow.sdk.decorators.task

Import from old path and verify DeprecationWarning; new path works

Old path raises DeprecationWarning, new path works

TC_DECORATORS_002

airflow.decorators

airflow.decorators.task_group

airflow.sdk.decorators.task_group

Import from old path and verify DeprecationWarning; new path works

Old path raises DeprecationWarning, new path works

TC_DECORATORS_003

airflow.decorators

airflow.decorators.dag

airflow.sdk.decorators.dag

Import from old path and verify DeprecationWarning; new path works

Old path raises DeprecationWarning, new path works


Test ID

Module

Old Path

New Path

Test Description

Expected Result

TC_UTILS_LOG_001

airflow.utils.log

airflow.utils.log.logging_mixin.LoggingMixin

airflow.sdk.utils.log.logging_mixin.LoggingMixin

Import from old path and verify DeprecationWarning; new path works

Old path raises DeprecationWarning, new path works

TC_UTILS_LOG_002

airflow.utils.log

airflow.utils.log.secrets_masker.SecretsMasker

airflow.sdk.utils.log.secrets_masker.SecretsMasker

Import from old path and verify DeprecationWarning; new path works

Old path raises DeprecationWarning, new path works

TC_UTILS_LOG_003

airflow.utils.log

airflow.utils.log.secrets_masker.redact

airflow.sdk.utils.log.secrets_masker.redact

Import from old path and verify DeprecationWarning; outputs match new path

Old path raises DeprecationWarning, outputs match

## airflow.secrets module deprecations

| Old Path | New Path |
|----------|----------|
| `airflow.secrets.cache.SecretCache` | `airflow.sdk.execution_time.cache.SecretCache` |

## airflow.notifications module deprecations

| Old Path | New Path |
|----------|----------|
| `airflow.notifications.basenotifier.BaseNotifier` | `airflow.sdk.bases.notifier.BaseNotifier` |

## airflow.models module deprecations

| Old Path | New Path |
|----------|----------|
| `airflow.models.abstractoperator.AbstractOperator` | `airflow.sdk.definitions._internal.abstractoperator.AbstractOperator` |
| `airflow.models.abstractoperator.NotMapped` | `airflow.sdk.definitions._internal.abstractoperator.NotMapped` |
| `airflow.models.abstractoperator.TaskStateChangeCallback` | `airflow.sdk.definitions._internal.abstractoperator.TaskStateChangeCallback` |
| `airflow.models.abstractoperator.DEFAULT_OWNER` | `airflow.sdk.definitions._internal.abstractoperator.DEFAULT_OWNER` |
| `airflow.models.abstractoperator.DEFAULT_QUEUE` | `airflow.sdk.definitions._internal.abstractoperator.DEFAULT_QUEUE` |
| `airflow.models.abstractoperator.DEFAULT_TASK_EXECUTION_TIMEOUT` | `airflow.sdk.definitions._internal.abstractoperator.DEFAULT_TASK_EXECUTION_TIMEOUT` |
| `airflow.models.param.Param` | `airflow.sdk.definitions.param.Param` |
| `airflow.models.param.ParamsDict` | `airflow.sdk.definitions.param.ParamsDict` |
| `airflow.models.baseoperator.BaseOperator` | `airflow.sdk.bases.operator.BaseOperator` |
| `airflow.models.baseoperator.chain` | `airflow.sdk.bases.operator.chain` |
| `airflow.models.baseoperator.chain_linear` | `airflow.sdk.bases.operator.chain_linear` |
| `airflow.models.baseoperator.cross_downstream` | `airflow.sdk.bases.operator.cross_downstream` |
| `airflow.models.baseoperatorlink.BaseOperatorLink` | `airflow.sdk.bases.operatorlink.BaseOperatorLink` |
| `airflow.models.operator.BaseOperator` | `airflow.sdk.bases.operator.BaseOperator` |
| `airflow.models.operator.Operator` | `airflow.sdk.types.Operator` |

## airflow.macros module deprecations

| Old Path | New Path |
|----------|----------|
| `airflow.macros.*` | `airflow.sdk.execution_time.macros` |

## airflow.io module deprecations

| Old Path | New Path |
|----------|----------|
| `airflow.io.get_fs` | `airflow.sdk.io.get_fs` |
| `airflow.io.has_fs` | `airflow.sdk.io.has_fs` |
| `airflow.io.attach` | `airflow.sdk.io.attach` |
| `airflow.io.Properties` | `airflow.sdk.io.Properties` |
| `airflow.io._BUILTIN_SCHEME_TO_FS` | `airflow.sdk.io.fs._BUILTIN_SCHEME_TO_FS` |
| `airflow.io.path.ObjectStoragePath` | `airflow.sdk.ObjectStoragePath` |
| `airflow.io.storage.attach` | `airflow.sdk.io.attach` |
| `airflow.io.typedef.Properties` | `airflow.sdk.io.typedef.Properties` |

## airflow.hooks module deprecations

| Old Path | New Path |
|----------|----------|
| `airflow.hooks.filesystem.FSHook` | `airflow.providers.standard.hooks.filesystem.FSHook` |
| `airflow.hooks.package_index.PackageIndexHook` | `airflow.providers.standard.hooks.package_index.PackageIndexHook` |
| `airflow.hooks.subprocess.SubprocessHook` | `airflow.providers.standard.hooks.subprocess.SubprocessHook` |
| `airflow.hooks.base.BaseHook` | `airflow.sdk.bases.hook.BaseHook` |

## airflow.decorators module deprecations

| Old Path | New Path |
|----------|----------|
| `airflow.decorators.dag` | `airflow.sdk.dag` |
| `airflow.decorators.setup` | `airflow.sdk.setup` |
| `airflow.decorators.task` | `airflow.sdk.task` |
| `airflow.decorators.task_group` | `airflow.sdk.task_group` |
| `airflow.decorators.teardown` | `airflow.sdk.teardown` |
| `airflow.decorators.base.DecoratedMappedOperator` | `airflow.sdk.bases.decorator.DecoratedMappedOperator` |
| `airflow.decorators.base.DecoratedOperator` | `airflow.sdk.bases.decorator.DecoratedOperator` |
| `airflow.decorators.base.TaskDecorator` | `airflow.sdk.bases.decorator.TaskDecorator` |
| `airflow.decorators.base.TaskDecoratorCollection` | `airflow.sdk.definitions.decorators.TaskDecoratorCollection` |
| `airflow.decorators.base.get_unique_task_id` | `airflow.sdk.bases.decorator.get_unique_task_id` |
| `airflow.decorators.base.task_decorator_factory` | `airflow.sdk.bases.decorator.task_decorator_factory` |

## airflow.utils.log module deprecations

...