Hi Luc,
Actually it almost works, because Refinery should not inherit from normal_eqns.non_linear_ls, only the adapter, AdaptLstbx. So I can do:
import abc
from scitbx.lstbx import normal_eqns
class Refinery(object):
__metaclass__ = abc.ABCMeta
pass
class AdaptLstbx(Refinery, normal_eqns.non_linear_ls):
class __metaclass__(normal_eqns.non_linear_ls.__class__, abc.ABCMeta): pass
pass
This successfully stops Refinery being constructed. However, you do point out the critical flaw, which is that AdaptLstbx can now be constructed, yet this still lacks the missing 'run' method, which would be supplied another child. Now the original raise NotImplementedError() seems like the clearest solution. I suppose this is why people on the internet argue that abc isn't pythonic.
Cheers