fix metaclass usage for py3
always import from ._compat