You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I just hit and interesting use case that I was not able to solve with this library. There is a module level variable and it's name has changed. Since is is not a function, I cannot decorate it with @deprecated(...).
I've been thinking about something like this as well as for actual modules themselves, so yeah, I'd like to see what's possible here—go ahead with a PR and I'll do whatever I can to help out. I wonder if it's possible to have one piece of code do what is currently being done as a decorator while also supporting your use-case, though? As in, perhaps the existing deprecated function switches to being implemented as a class to cover both, rather than possibly having two ways to do it (though I'm not sure if that's what you were suggesting).
That answer by Unknown looks like a pretty good starting point for something like this.
Hi. I just hit and interesting use case that I was not able to solve with this library. There is a module level variable and it's name has changed. Since is is not a function, I cannot decorate it with
@deprecated(...)
.I searched for possible solutions and found a couple of them in here: https://stackoverflow.com/questions/922550/how-to-mark-a-global-as-deprecated-in-python I liked the second solution with the Deprecated class, becasue it is similar to
@deprecated(...)
and would allow to have the same interface.I'm considering making a pull request but would like to check first if there would be an appetite for that.
The text was updated successfully, but these errors were encountered: