Antonio Cuni avatar Antonio Cuni committed 1d8feb0

make autopath and our pytest.py compatible with python3: this is needed to run -A tests with the compiled pypy-c

Comments (0)

Files changed (36)

pypy/annotation/test/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/bin/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/config/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/doc/config/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/interpreter/pyparser/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/jit/backend/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/jit/backend/x86/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/jit/backend/x86/tool/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/jit/tl/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/jit/tl/spli/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/jit/tool/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/module/__builtin__/test/autopath.py

     sys.path.insert(0, head)
 
     munged = {}
-    for name, mod in list(sys.modules.items()):
+    for name, mod in sys.modules.items():
         if '.' in name:
             continue
         fn = getattr(mod, '__file__', None)

pypy/module/_codecs/test/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/module/_sre/test/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/module/sys/test/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/rlib/parsing/test/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/rlib/test/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/rpython/microbench/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/tool/algo/test/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/tool/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/tool/pytest/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/tool/release/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/tool/test/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/translator/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/translator/c/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/translator/c/gcc/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/translator/c/test/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/translator/cli/test/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/translator/goal/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/translator/goal/test2/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/translator/microbench/pybench/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/translator/sandbox/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/translator/sandbox/test/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/translator/test/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:

pypy/translator/tool/autopath.py

             if modpath not in sys.modules:
                 munged[modpath] = mod
 
-    for name, mod in munged.iteritems():
+    for name, mod in munged.items():
         if name not in sys.modules:
             sys.modules[name] = mod
         if '.' in name:
             f = open(fn, 'rwb+')
             try:
                 if f.read() == arg:
-                    print "checkok", fn
+                    print("checkok", fn)
                 else:
-                    print "syncing", fn
+                    print("syncing", fn)
                     f = open(fn, 'w')
                     f.write(arg)
             finally:
 # 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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.