Move context_managers to base class, overridden by mixed.