re-merge upstream master. keep divergence minimal

@jdobbie @neilfulwiler