Merge issue #26355 fix from Python 3.5