[pypy-commit] pypy py3k: Adapt some applevel code to py3k

amauryfa noreply at buildbot.pypy.org
Tue Oct 18 00:38:00 CEST 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r48169:d3e2d6ec5903
Date: 2011-10-17 23:33 +0200
http://bitbucket.org/pypy/pypy/changeset/d3e2d6ec5903/

Log:	Adapt some applevel code to py3k

diff --git a/pypy/module/__builtin__/app_io.py b/pypy/module/__builtin__/app_io.py
--- a/pypy/module/__builtin__/app_io.py
+++ b/pypy/module/__builtin__/app_io.py
@@ -18,7 +18,7 @@
             loc = locals()
     elif loc is None:
         loc = glob
-    f = file(filename, 'rU')
+    f = open(filename, 'rU')
     try:
         source = f.read()
     finally:
diff --git a/pypy/module/sys/currentframes.py b/pypy/module/sys/currentframes.py
--- a/pypy/module/sys/currentframes.py
+++ b/pypy/module/sys/currentframes.py
@@ -5,7 +5,7 @@
 
 app = gateway.applevel('''
 "NOT_RPYTHON"
-import __builtin__
+import builtins
 
 class fake_code(object):
     co_name = "?"
@@ -14,7 +14,7 @@
 
 class fake_frame(object):
     f_back = None
-    f_builtins = __builtin__.__dict__
+    f_builtins = builtins.__dict__
     f_code = fake_code()
     f_exc_traceback = None
     f_exc_type = None


More information about the pypy-commit mailing list