Author: Philip Jenvey <[email protected]>
Branch: py3.5
Changeset: r87927:5cc5570e4f49
Date: 2016-10-24 21:44 -0700
http://bitbucket.org/pypy/pypy/changeset/5cc5570e4f49/

Log:    adjust per py3

        fixes #2306

diff --git a/lib-python/3/test/test_descr.py b/lib-python/3/test/test_descr.py
--- a/lib-python/3/test/test_descr.py
+++ b/lib-python/3/test/test_descr.py
@@ -4497,8 +4497,6 @@
         for o in gc.get_objects():
             self.assertIsNot(type(o), X)
 
-    @unittest.skipIf(support.check_impl_detail(pypy=True),
-                     "https://bitbucket.org/pypy/pypy/issues/2306";)
     def test_object_new_and_init_with_parameters(self):
         # See issue #1683368
         class OverrideNeither:
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
@@ -92,16 +92,10 @@
     w_type = _precheck_for_new(space, w_type)
 
     if _excess_args(__args__):
+        w_parent_init, _ = space.lookup_in_type_where(w_type, '__init__')
         w_parent_new, _ = space.lookup_in_type_where(w_type, '__new__')
-        w_parent_init, _ = space.lookup_in_type_where(w_type, '__init__')
-        if (w_parent_new is not space.w_object and
-            w_parent_init is not space.w_object):
-            # 2.7: warn about excess arguments when both methods are
-            # overridden
-            space.warn(space.wrap("object() takes no parameters"),
-                       space.w_DeprecationWarning, 1)
-        elif (w_parent_new is not space.w_object or
-              w_parent_init is space.w_object):
+        if (w_parent_init is space.w_object or
+            w_parent_new is not space.w_object):
             raise oefmt(space.w_TypeError,
                         "object() takes no parameters")
     if w_type.is_abstract():
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to