import sys

is_py2 = sys.version_info[0] == 2

if is_py2:
	maxint = sys.maxint
	keys_set = lambda d: set(d.keys())
	from itertools import izip_longest as zip_longest
else:
	maxint = sys.maxsize
	keys_set = dict.keys
	from itertools import zip_longest

@@ -55,29 +55,8 @@
 y2:%0A
-%09maxint = sys.maxint%0A
 %09key
@@ -91,140 +91,32 @@
 ())%0A
-%09from itertools import izip_longest as zip_longest%0Aelse:%0A%09maxint = sys.maxsize%0A%09keys_set = dict.keys%0A%09from itertools import zip_longest
+else:%0A%09keys_set = dict.keys
 %0A

Remove unused code from _compat