aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2017-09-29 17:48:33 +0200
committerArmin Rigo <arigo@tunes.org>2017-09-29 17:48:33 +0200
commit4db6da77dcf11afc970a5e5e3c250122bea11ba6 (patch)
treef8c005041879e3e3044974e3f7b1c51e2bed403f
parent(antocuni, arigo) Issue #2666 (diff)
downloadpypy-4db6da77dcf11afc970a5e5e3c250122bea11ba6.tar.gz
pypy-4db6da77dcf11afc970a5e5e3c250122bea11ba6.tar.bz2
pypy-4db6da77dcf11afc970a5e5e3c250122bea11ba6.zip
(antocuni, arigo)
oops, fix for 3f4fc7771154 (some tests in cpyext fail)
-rw-r--r--pypy/objspace/std/typeobject.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/pypy/objspace/std/typeobject.py b/pypy/objspace/std/typeobject.py
index 4b60adbfb7..820eaf74bc 100644
--- a/pypy/objspace/std/typeobject.py
+++ b/pypy/objspace/std/typeobject.py
@@ -670,6 +670,7 @@ class W_TypeObject(W_Root):
from pypy.module.cpyext.typeobject import is_tp_new_wrapper
if (isinstance(w_newdescr, W_PyCFunctionObject) and
+ w_newtype is not self and
is_tp_new_wrapper(self.space, w_newdescr.ml)):
w_bestbase = find_best_base(self.bases_w)
return w_bestbase.lookup_where('__new__')