Restrictions and editions upgrade

Copy of #2000 for master.