I love this package. I'm wondering if there's a way to use deprecated as a context manager inside a function? The reason is that there is only certain behavior of a function that is deprecated, and this is determined dynamically. So basically I have a if statement inside my function, and only when its condition is satisfied will the deprecated behavior run. Is the only solution to define a nested function to run conditionally, and decorate it as deprecated? Could you be convinced to support a context manager that can be used to wrap local logic that's not a dedicated function?
I love this package. I'm wondering if there's a way to use
deprecatedas a context manager inside a function? The reason is that there is only certain behavior of a function that is deprecated, and this is determined dynamically. So basically I have aifstatement inside my function, and only when its condition is satisfied will the deprecated behavior run. Is the only solution to define a nested function to run conditionally, and decorate it as deprecated? Could you be convinced to support a context manager that can be used to wrap local logic that's not a dedicated function?