With agreement from @attrc and @imhlv2, I'm removing the useless
validate method from the object. It defaulted to returning inaccurate
information (validity undetermined, but validate returned True as if
validation had happened) and is better handled by individual classes
implementing is_valid (which seems the preferred nomenclature) and
throwing exceptions if it's called on a class that doesn't have it.
So this allows people to alter the APIs for their plugins and allows
plugins to verify the API is compatible with the one they expect.
It adds a version property to Plugin classes, and has a SemVer checking
method which can be called from other plugins to verify a plugin against
a particular version.
Relented on the strict import of direct objects/classes for the typing
module only. Typing module components can be directly imported because
it makes the code really painful to read and write otherwise.
This is still in-line with the python style guide adopted from Google at
http://google.github.io/styleguide/pyguide.html section 2.2.
We determine address_masks using log/ln2, which cannot accept 0.
Therefore we don't support address spaces with a maximum_address of 0.
This can affect registry hives, so we've added a check in registry hives
to prevent creating layers with invalid maximum_addresses.
By not passing the arguments from exceptions down to the
base class Exception, it causes an issue when they are
pickled to be passed between processes. For more information,
see http://bugs.python.org/issue1692335.