"""
The :mod:`ast` module contains the shims which implement AST classes
missing in versions of Python earlier than the latest one pyparser targets.
"""

from __future__ import absolute_import, division, print_function, unicode_literals
from ast import *
import sys

if sys.version_info <= (2, 6):
    class DictComp(expr):
        _fields = ('key', 'value', 'generators')

    class Set(expr):
        _fields = ('elts',)

    class SetComp(expr):
        _fields = ('elt', 'generators')

@@ -466,24 +466,320 @@
 = ('elt', 'generators')%0A
+%0Aif sys.version_info %3E= (3,):%0A    class Repr(expr):%0A        _fields = ('value',)%0A%0A    class Exec(expr):%0A        _fields = ('body', 'globals', 'locals')%0A%0A    class Print(expr):%0A        _fields = ('dest', 'values', 'nl')%0A%0A    class TryExcept(stmt):%0A        _fields = ('body', 'handlers', 'orelse')%0A

Update ast.shim for Python 3.