Mark proxy properties on scmtools.models.Tool as deprecated.

Review Request #12331 — Created June 3, 2022 and submitted — Latest diff uploaded

Information

Review Board
release-5.0.x

Reviewers

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
via the scmtool_class property 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.

Commits

Files

    Loading...