Mark proxy properties on scmtools.models.Tool as deprecated.
Review Request #12331 — Created June 3, 2022 and submitted
The Tool model has a handful of properties which proxy things which
are provided by the SCMTool subclass. This was used a long time ago to
make it easier to render things in templates (since trying to access the
class in the template would end up instantiating it). We haven't used
templates for this stuff in a long time, and all our code accesses these
scmtool_classproperty rather than these proxies.
This change adds a wrapper which will raise a deprecation warning if any
of these properties are accessed via the tool.
- Opened a shell, enabled all warnings, and then accessed properties via
the tool instance. Saw that I got the correct results, and that the
deprecation warning was raised.
- Ran unit tests.
I've landed my deprecation updates change, so this can go.
Can you add a Version Added?
We should probably use functools.wraps to ensure all the function attributes are set right.
You don't need warnings anymore. You can just call RemovedInReviewBoard60Warning.warn(...) with the string.