[1.7.x] Fixed #23088 -- Used `six` `range` type in `Paginator.page_range`.

Backport of 6508db2ff9 from master