[1.4.x] Fixed #23990 -- Fix SyntaxError with Python 3