Use a special property instead of a metaclass for default SCMTool IDs.

Review Request #10807 — Created Nov. 27, 2019 and updated

chipx86
Review Board
release-3.0.x
fca1fd1...
reviewboard

The new SCMTool ID support was written to use a metaclass to
automatically set an ID at the time a class is created. This actually
broke Power Pack, which makes use of its own metaclasses, and therefore
broke the metaclass chain.

This change erases that metaclass and goes with a new approach, which is
to use a specialized property that will return the correct ID for the
class. This is less invasive and makes for an easier transition, as it
will trigger lookup failures at the time the property is accessed rather
than early in an application's startup.

There's also a fix for CVSTool, which used the wrong attribute to set
the ID, and a fix for the EntryPoint-calculated IDs that were using the
wrong string type.

Review Board and Power Pack unit tests pass

Checks run (2 succeeded)
flake8 passed.
JSHint passed.
david
  1. Ship It!
  2. 
      
Loading...