[pypy-commit] pypy py3.3: merge py3k

pjenvey noreply at buildbot.pypy.org
Sat Aug 2 03:41:48 CEST 2014


Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3.3
Changeset: r72653:777f424bdd72
Date: 2014-08-01 18:11 -0700
http://bitbucket.org/pypy/pypy/changeset/777f424bdd72/

Log:	merge py3k

diff --git a/pypy/interpreter/test/test_typedef.py b/pypy/interpreter/test/test_typedef.py
--- a/pypy/interpreter/test/test_typedef.py
+++ b/pypy/interpreter/test/test_typedef.py
@@ -394,13 +394,6 @@
         # differs from .im_class in case the method is
         # defined in some parent class of l's actual class
 
-    def test_classmethod_im_class(self):
-        class Foo(object):
-            @classmethod
-            def bar(cls):
-                pass
-        assert Foo.bar.im_class is type
-
     def test_func_closure(self):
         x = 2
         def f():
diff --git a/pypy/module/__builtin__/app_inspect.py b/pypy/module/__builtin__/app_inspect.py
--- a/pypy/module/__builtin__/app_inspect.py
+++ b/pypy/module/__builtin__/app_inspect.py
@@ -7,8 +7,8 @@
 
 from __pypy__ import lookup_special
 
-def _caller_locals(): 
-    return sys._getframe(0).f_locals 
+def _caller_locals():
+    return sys._getframe(0).f_locals
 
 def vars(*obj):
     """Return a dictionary of all the attributes currently bound in obj.  If
@@ -18,11 +18,10 @@
         return _caller_locals()
     elif len(obj) != 1:
         raise TypeError("vars() takes at most 1 argument.")
-    else:
-        try:
-            return obj[0].__dict__
-        except AttributeError:
-            raise TypeError("vars() argument must have __dict__ attribute")
+    try:
+        return obj[0].__dict__
+    except AttributeError:
+        raise TypeError("vars() argument must have __dict__ attribute")
 
 def dir(*args):
     """dir([object]) -> list of strings
@@ -38,15 +37,13 @@
         attributes of its class's base classes.
     """
     if len(args) > 1:
-        raise TypeError("dir expected at most 1 arguments, got %d"
-                        % len(args))
+        raise TypeError("dir expected at most 1 arguments, got %d" % len(args))
     if len(args) == 0:
         local_names = list(_caller_locals().keys()) # 2 stackframes away
         local_names.sort()
         return local_names
 
     obj = args[0]
-
     dir_meth = lookup_special(obj, "__dir__")
     if dir_meth is not None:
         result = dir_meth()
diff --git a/pypy/objspace/std/util.py b/pypy/objspace/std/util.py
--- a/pypy/objspace/std/util.py
+++ b/pypy/objspace/std/util.py
@@ -1,3 +1,5 @@
+from pypy.interpreter import gateway
+
 def negate(f):
     """Create a function which calls `f` and negates its result.  When the
     result is ``space.w_NotImplemented``, ``space.w_NotImplemented`` is


More information about the pypy-commit mailing list