vincbeck commented on PR #55070:
URL: https://github.com/apache/airflow/pull/55070#issuecomment-3254570958
> Got it - so the plan would be to:
>
> Deprecate get_file_metadata with a deprecation warning?
> Create a new get_file_metadata method that returns an Iterator, and use
that in the Sensor.
Correct
> What is the best way to deprecate a method and create one with the same
name?
To deprecate a method, please emit deprecation warning at the beginning of
the method. Example below:
```
warnings.warn(
"The property `async_conn` is deprecated. Accessing it in an
async context will cause the event loop to block. "
"Use the async method `get_async_conn` instead.",
AirflowProviderDeprecationWarning,
stacklevel=2,
)
```
> Or should I create a new method with a new name, and use this one in the
Sensor?
Yes, you should create a new one with a new name
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]