Commits

Brian Kearns  committed 7656fc1

port a few small no-op cleanups from py3k

  • Participants
  • Parent commits 146a6b1

Comments (0)

Files changed (4)

File pypy/__init__.py

 # When all tests work, this branch will be merged
 # and the branch stage 2 is started, where we remove this patch.
 import sys
-if hasattr(sys, "maxsize"):
+if hasattr(sys, "maxint") and hasattr(sys, "maxsize"):
     if sys.maxint != sys.maxsize:
         sys.maxint = sys.maxsize
         import warnings

File pypy/conftest.py

 py.code.Source.deindent = braindead_deindent
 
 def pytest_report_header():
-    return "pytest-%s from %s" %(pytest.__version__, pytest.__file__)
+    return "pytest-%s from %s" % (pytest.__version__, pytest.__file__)
 
 def pytest_addhooks(pluginmanager):
     from rpython.conftest import LeakFinder

File pypy/interpreter/app_main.py

     except AttributeError:
         print >> sys.stderr, 'no translation information found'
     else:
-        optitems = options.items()
-        optitems.sort()
+        optitems = sorted(options.items())
         current = []
         for key, value in optitems:
             group = key.split('.')
     except ImportError:
         print >> sys.stderr, "No jit support in %s" % (sys.executable,)
         return
-    items = pypyjit.defaults.items()
-    items.sort()
+    items = sorted(pypyjit.defaults.items())
     print 'Advanced JIT options: a comma-separated list of OPTION=VALUE:'
     for key, value in items:
         print
 # When all tests work, this branch will be merged
 # and the branch stage 2 is started, where we remove this patch.
 import sys
-if hasattr(sys, "maxsize"):
+if hasattr(sys, "maxint") and hasattr(sys, "maxsize"):
     if sys.maxint != sys.maxsize:
         sys.maxint = sys.maxsize
         import warnings