[pypy-commit] pypy py3.5: 2to3
rlamy
pypy.commits at gmail.com
Wed Nov 16 20:43:54 EST 2016
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3.5
Changeset: r88421:15a86b62540d
Date: 2016-11-17 01:42 +0000
http://bitbucket.org/pypy/pypy/changeset/15a86b62540d/
Log: 2to3
diff --git a/pypy/module/pypyjit/test_pypy_c/test_alloc.py b/pypy/module/pypyjit/test_pypy_c/test_alloc.py
--- a/pypy/module/pypyjit/test_pypy_c/test_alloc.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_alloc.py
@@ -16,7 +16,7 @@
N = %(size)d
part_a = 'a' * N
part_b = 'b' * N
- for i in xrange(20):
+ for i in range(20):
ao = '%%s%%s' %% (part_a, part_b)
def main():
return 42
diff --git a/pypy/module/pypyjit/test_pypy_c/test_call.py b/pypy/module/pypyjit/test_pypy_c/test_call.py
--- a/pypy/module/pypyjit/test_pypy_c/test_call.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_call.py
@@ -403,7 +403,7 @@
def main(n):
i = 1
while i < n:
- i += len(xrange(i+1)) - i
+ i += len(range(i+1)) - i
return i
log = self.run(main, [10000])
diff --git a/pypy/module/pypyjit/test_pypy_c/test_ffi.py b/pypy/module/pypyjit/test_pypy_c/test_ffi.py
--- a/pypy/module/pypyjit/test_pypy_c/test_ffi.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_ffi.py
@@ -401,7 +401,7 @@
};
""")
- for i in xrange(n):
+ for i in range(n):
ffi.new("struct s *", [i, i, i])
log = self.run(main, [300])
diff --git a/pypy/module/pypyjit/test_pypy_c/test_jitlogparser.py b/pypy/module/pypyjit/test_pypy_c/test_jitlogparser.py
--- a/pypy/module/pypyjit/test_pypy_c/test_jitlogparser.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_jitlogparser.py
@@ -14,12 +14,12 @@
def test(self):
def fn_with_bridges(N):
def is_prime(x):
- for y in xrange(2, x):
+ for y in range(2, x):
if x % y == 0:
return False
return True
result = 0
- for x in xrange(N):
+ for x in range(N):
if x % 3 == 0:
result += 5
elif x % 5 == 0:
diff --git a/pypy/module/pypyjit/test_pypy_c/test_string.py b/pypy/module/pypyjit/test_pypy_c/test_string.py
--- a/pypy/module/pypyjit/test_pypy_c/test_string.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_string.py
@@ -179,7 +179,7 @@
import codecs
def main(n):
- for i in xrange(n):
+ for i in range(n):
codecs.lookup('utf8')
return i
""", [1000])
@@ -197,7 +197,7 @@
def test_decode_ascii(self):
log = self.run("""
def main(n):
- for i in xrange(n):
+ for i in range(n):
unicode(str(i))
return i
""", [1000])
diff --git a/pypy/module/pypyjit/test_pypy_c/test_weakref.py b/pypy/module/pypyjit/test_pypy_c/test_weakref.py
--- a/pypy/module/pypyjit/test_pypy_c/test_weakref.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_weakref.py
@@ -14,7 +14,7 @@
def main(n):
obj = Dummy()
- for i in xrange(n):
+ for i in range(n):
weakref.ref(obj, noop)
""", [500])
loop, = log.loops_by_filename(self.filepath)
More information about the pypy-commit
mailing list