Issue #28998: More APIs now support longs as well as ints.
diff --git a/Lib/lib2to3/pgen2/pgen.py b/Lib/lib2to3/pgen2/pgen.py
index ed16992..be4fcad 100644
--- a/Lib/lib2to3/pgen2/pgen.py
+++ b/Lib/lib2to3/pgen2/pgen.py
@@ -74,7 +74,7 @@
             else:
                 # A named token (NAME, NUMBER, STRING)
                 itoken = getattr(token, label, None)
-                assert isinstance(itoken, int), label
+                assert isinstance(itoken, (int, long)), label
                 assert itoken in token.tok_name, label
                 if itoken in c.tokens:
                     return c.tokens[itoken]