[pypy-commit] pypy default: (cfbolz around, arigo) Detect when we use at the same time the old and the new style of mixins
arigo
noreply at buildbot.pypy.org
Tue Aug 11 16:51:07 CEST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r78902:deb3c9fb551c
Date: 2015-08-11 15:51 +0100
http://bitbucket.org/pypy/pypy/changeset/deb3c9fb551c/
Log: (cfbolz around, arigo) Detect when we use at the same time the old
and the new style of mixins
diff --git a/rpython/rlib/objectmodel.py b/rpython/rlib/objectmodel.py
--- a/rpython/rlib/objectmodel.py
+++ b/rpython/rlib/objectmodel.py
@@ -839,6 +839,9 @@
if key in target:
raise Exception("import_from_mixin: would overwrite the value "
"already defined locally for %r" % (key,))
+ if key == '_mixin_':
+ raise Exception("import_from_mixin(M): class M should not "
+ "have '_mixin_ = True'")
target[key] = value
if immutable_fields:
target['_immutable_fields_'] = target.get('_immutable_fields_', []) + immutable_fields
More information about the pypy-commit
mailing list