import sys
import types
from ast import PyCF_ONLY_AST

PY2 = sys.version_info[0] == 2
PYPY = hasattr(sys, 'pypy_translation_info')

_identity = lambda x: x

if not PY2:
    string_types = (str,)
    integer_types = (int,)
    long = int
    class_types = (type,)

    from io import StringIO
    import builtins

    def to_bytes(s):
        return s.encode()

    def to_str(b):
        return b.decode()
else:
    string_types = (str, unicode)
    integer_types = (int, long)
    long = long
    class_types = (type, types.ClassType)

    from cStringIO import StringIO
    import __builtin__ as builtins

    to_bytes = _identity
    to_str = _identity

def ast_parse(s):
    return compile(s, '<string>', 'exec', PyCF_ONLY_AST)

from __future__ import print_function
from __future__ import division
import sys
import types
from ast import PyCF_ONLY_AST

PY2 = sys.version_info[0] == 2
PYPY = hasattr(sys, 'pypy_translation_info')

_identity = lambda x: x

if not PY2:
    string_types = (str,)
    integer_types = (int,)
    long = int
    class_types = (type,)

    from io import StringIO
    import builtins

    def to_bytes(s):
        return s.encode()

    def to_str(b):
        return b.decode()
else:
    string_types = (str, unicode)
    integer_types = (int, long)
    long = long
    class_types = (type, types.ClassType)

    from cStringIO import StringIO
    import __builtin__ as builtins

    to_bytes = _identity
    to_str = _identity

def ast_parse(s):
    return compile(s, '<string>', 'exec', \
                   print_function.compiler_flag|division.compiler_flag|PyCF_ONLY_AST)

Revert "Remove the __future__ flags"
Revert "Remove the __future__ flags"

This reverts commit 24b3332ca0c0005483d5f310604cca984efd1ce9.

+ from __future__ import print_function
+ from __future__ import division
  import sys
  import types
  from ast import PyCF_ONLY_AST
  
  PY2 = sys.version_info[0] == 2
  PYPY = hasattr(sys, 'pypy_translation_info')
  
  _identity = lambda x: x
  
  if not PY2:
      string_types = (str,)
      integer_types = (int,)
      long = int
      class_types = (type,)
  
      from io import StringIO
      import builtins
  
      def to_bytes(s):
          return s.encode()
  
      def to_str(b):
          return b.decode()
  else:
      string_types = (str, unicode)
      integer_types = (int, long)
      long = long
      class_types = (type, types.ClassType)
  
      from cStringIO import StringIO
      import __builtin__ as builtins
  
      to_bytes = _identity
      to_str = _identity
  
  def ast_parse(s):
-     return compile(s, '<string>', 'exec', PyCF_ONLY_AST)
+     return compile(s, '<string>', 'exec', \
+                    print_function.compiler_flag|division.compiler_flag|PyCF_ONLY_AST)
  
Revert "Remove the __future__ flags"
## Code Before:
import sys
import types
from ast import PyCF_ONLY_AST

PY2 = sys.version_info[0] == 2
PYPY = hasattr(sys, 'pypy_translation_info')

_identity = lambda x: x

if not PY2:
    string_types = (str,)
    integer_types = (int,)
    long = int
    class_types = (type,)

    from io import StringIO
    import builtins

    def to_bytes(s):
        return s.encode()

    def to_str(b):
        return b.decode()
else:
    string_types = (str, unicode)
    integer_types = (int, long)
    long = long
    class_types = (type, types.ClassType)

    from cStringIO import StringIO
    import __builtin__ as builtins

    to_bytes = _identity
    to_str = _identity

def ast_parse(s):
    return compile(s, '<string>', 'exec', PyCF_ONLY_AST)

## Instruction:
Revert "Remove the __future__ flags"
## Code After:
from __future__ import print_function
from __future__ import division
import sys
import types
from ast import PyCF_ONLY_AST

PY2 = sys.version_info[0] == 2
PYPY = hasattr(sys, 'pypy_translation_info')

_identity = lambda x: x

if not PY2:
    string_types = (str,)
    integer_types = (int,)
    long = int
    class_types = (type,)

    from io import StringIO
    import builtins

    def to_bytes(s):
        return s.encode()

    def to_str(b):
        return b.decode()
else:
    string_types = (str, unicode)
    integer_types = (int, long)
    long = long
    class_types = (type, types.ClassType)

    from cStringIO import StringIO
    import __builtin__ as builtins

    to_bytes = _identity
    to_str = _identity

def ast_parse(s):
    return compile(s, '<string>', 'exec', \
                   print_function.compiler_flag|division.compiler_flag|PyCF_ONLY_AST)
