Author: Manuel Jacob
Branch: kill-multimethod
Changeset: r69435:646434ae7b6d
Date: 2014-02-25 18:08 +0100
http://bitbucket.org/pypy/pypy/changeset/646434ae7b6d/

Log:    Kill model.UnwrapError.

diff --git a/pypy/objspace/std/model.py b/pypy/objspace/std/model.py
--- a/pypy/objspace/std/model.py
+++ b/pypy/objspace/std/model.py
@@ -34,7 +34,3 @@
         if w_cls is not None and w_cls is not self:
             s += ' instance of %s' % self.w__class__
         return '<%s>' % s
-
-
-class UnwrapError(Exception):
-    pass
diff --git a/pypy/objspace/std/objspace.py b/pypy/objspace/std/objspace.py
--- a/pypy/objspace/std/objspace.py
+++ b/pypy/objspace/std/objspace.py
@@ -3,8 +3,7 @@
 from pypy.interpreter.baseobjspace import ObjSpace, W_Root
 from pypy.interpreter.error import OperationError, oefmt
 from pypy.interpreter.typedef import get_unique_interplevel_subclass
-from pypy.objspace.std import (stdtypedef, frame, model,
-                               transparent, callmethod)
+from pypy.objspace.std import stdtypedef, frame, transparent, callmethod
 from pypy.objspace.descroperation import DescrOperation, raiseattrerror
 from rpython.rlib.objectmodel import instantiate, specialize, 
is_annotation_constant
 from rpython.rlib.debug import make_sure_not_resized
@@ -245,7 +244,7 @@
         # _____ this code is here to support testing only _____
         if isinstance(w_obj, W_Root):
             return w_obj.unwrap(self)
-        raise model.UnwrapError("cannot unwrap: %r" % w_obj)
+        raise TypeError("cannot unwrap: %r" % w_obj)
 
     def newint(self, intval):
         return wrapint(self, intval)
diff --git a/pypy/objspace/std/typeobject.py b/pypy/objspace/std/typeobject.py
--- a/pypy/objspace/std/typeobject.py
+++ b/pypy/objspace/std/typeobject.py
@@ -439,10 +439,6 @@
         storage = strategy.erase(w_self)
         return W_DictMultiObject(space, strategy, storage)
 
-    def unwrap(w_self, space):
-        from pypy.objspace.std.model import UnwrapError
-        raise UnwrapError(w_self)
-
     def is_heaptype(w_self):
         return w_self.flag_heaptype
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to