Author: Brian Kearns <[email protected]>
Branch:
Changeset: r61979:7656fc10050b
Date: 2013-03-03 19:38 -0500
http://bitbucket.org/pypy/pypy/changeset/7656fc10050b/
Log: port a few small no-op cleanups from py3k
diff --git a/pypy/__init__.py b/pypy/__init__.py
--- a/pypy/__init__.py
+++ b/pypy/__init__.py
@@ -6,7 +6,7 @@
# 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
diff --git a/pypy/conftest.py b/pypy/conftest.py
--- a/pypy/conftest.py
+++ b/pypy/conftest.py
@@ -23,7 +23,7 @@
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
diff --git a/pypy/interpreter/app_main.py b/pypy/interpreter/app_main.py
--- a/pypy/interpreter/app_main.py
+++ b/pypy/interpreter/app_main.py
@@ -120,8 +120,7 @@
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('.')
@@ -151,8 +150,7 @@
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
diff --git a/pytest.py b/pytest.py
--- a/pytest.py
+++ b/pytest.py
@@ -23,7 +23,7 @@
# 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
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit