sys.maxint -> sys.maxsize (introduced in Python 2.6)

this is done to start making ly working with python3