Allow page merging to work under Python 3