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

Remove deprecated apply_default decorator from HexOperator #19

Open
jacobcbeaudin opened this issue Sep 7, 2024 · 0 comments · May be fixed by #21
Open

Remove deprecated apply_default decorator from HexOperator #19

jacobcbeaudin opened this issue Sep 7, 2024 · 0 comments · May be fixed by #21

Comments

@jacobcbeaudin
Copy link

Remove deprecated apply_default decorator from HexOperator

Description

When using the airflow_provider_hex package, the following deprecation warning is being generated:

[2024-09-07T13:43:27.523+0000] {logging_mixin.py:188} WARNING - /usr/local/airflow/.local/lib/python3.11/site-packages/airflow_provider_hex/operators/hex.py:11 RemovedInAirflow3Warning: This decorator is deprecated.

In previous versions, all subclasses of BaseOperator must use apply_default decorator for the `default_args` feature to work properly.

In current version, it is optional. The decorator is applied automatically using the metaclass.

This warning indicates that the apply_default decorator used in the HexOperator class (located in /usr/local/airflow/.local/lib/python3.11/site-packages/airflow_provider_hex/operators/hex.py at line 11) is deprecated and no longer necessary in the current version of Airflow.

Expected Behavior

The HexRunProjectOperator should not use the deprecated apply_default decorator, as it's now automatically applied by the metaclass in Airflow.

Proposed Solution

Remove the @apply_default decorator from the HexOperator class in the hex.py file.

Steps to Reproduce

  1. Install the airflow_provider_hex package
  2. Use the HexRunProjectOperator in an Airflow DAG
  3. Run the DAG or perform a task that involves the HexOperator
  4. Observe the deprecation warning in the logs
@jacobcbeaudin jacobcbeaudin linked a pull request Sep 7, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant