Author: Philip Jenvey <[email protected]>
Branch: py3.3
Changeset: r74193:c364311cc8e9
Date: 2014-10-24 13:56 -0700
http://bitbucket.org/pypy/pypy/changeset/c364311cc8e9/

Log:    readapt py3.3's object changes

diff --git a/pypy/objspace/std/objectobject.py 
b/pypy/objspace/std/objectobject.py
--- a/pypy/objspace/std/objectobject.py
+++ b/pypy/objspace/std/objectobject.py
@@ -204,7 +204,7 @@
         raise OperationError(space.w_TypeError, space.wrap(msg))
     if space.len_w(w_format_spec) > 0:
         msg = "object.__format__ with a non-empty format string is deprecated"
-        space.warn(space.wrap(msg), space.w_PendingDeprecationWarning)
+        space.warn(space.wrap(msg), space.w_DeprecationWarning)
     return space.format(w_as_str, w_format_spec)
 
 def descr__eq__(space, w_self, w_other):
@@ -220,6 +220,9 @@
 def descr_richcompare(space, w_self, w_other):
     return space.w_NotImplemented
 
+def descr__dir__(space, w_obj):
+    from pypy.objspace.std.util import _objectdir
+    return space.call_function(space.w_list, _objectdir(space, w_obj))
 
 W_ObjectObject.typedef = StdTypeDef("object",
     __doc__ = "The most base type",
@@ -239,6 +242,7 @@
     __reduce__ = interp2app(descr__reduce__),
     __reduce_ex__ = interp2app(descr__reduce_ex__),
     __format__ = interp2app(descr___format__),
+    __dir__ = interp2app(descr__dir__),
 
     __eq__ = interp2app(descr__eq__),
     __ne__ = interp2app(descr__ne__),
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to