Author: Manuel Jacob
Branch: kill-multimethod
Changeset: r69444:5a5429019418
Date: 2014-02-25 19:21 +0100
http://bitbucket.org/pypy/pypy/changeset/5a5429019418/
Log: Remove StdTypeDef alias and change all references.
diff --git a/pypy/objspace/fake/objspace.py b/pypy/objspace/fake/objspace.py
--- a/pypy/objspace/fake/objspace.py
+++ b/pypy/objspace/fake/objspace.py
@@ -2,7 +2,6 @@
from pypy.interpreter import argument, gateway
from pypy.interpreter.baseobjspace import W_Root, ObjSpace, SpaceCache
from pypy.interpreter.typedef import TypeDef, GetSetProperty
-from pypy.objspace.std.stdtypedef import StdTypeDef
from pypy.objspace.std.sliceobject import W_SliceObject
from rpython.rlib.objectmodel import instantiate, we_are_translated, specialize
from rpython.rlib.nonconst import NonConstant
@@ -365,9 +364,8 @@
@specialize.memo()
def see_typedef(space, typedef):
assert isinstance(typedef, TypeDef)
- if not isinstance(typedef, StdTypeDef):
- for name, value in typedef.rawdict.items():
- space.wrap(value)
+ for name, value in typedef.rawdict.items():
+ space.wrap(value)
class FakeCompiler(object):
pass
diff --git a/pypy/objspace/std/basestringtype.py
b/pypy/objspace/std/basestringtype.py
--- a/pypy/objspace/std/basestringtype.py
+++ b/pypy/objspace/std/basestringtype.py
@@ -1,7 +1,7 @@
-from pypy.objspace.std.stdtypedef import StdTypeDef
+from pypy.interpreter.typedef import TypeDef
-basestring_typedef = StdTypeDef("basestring",
+basestring_typedef = TypeDef("basestring",
__doc__ = ("basestring cannot be instantiated; "
"it is the base for str and unicode.")
)
diff --git a/pypy/objspace/std/boolobject.py b/pypy/objspace/std/boolobject.py
--- a/pypy/objspace/std/boolobject.py
+++ b/pypy/objspace/std/boolobject.py
@@ -6,8 +6,8 @@
from rpython.tool.sourcetools import func_renamer, func_with_new_name
from pypy.interpreter.gateway import WrappedDefault, interp2app, unwrap_spec
+from pypy.interpreter.typedef import TypeDef
from pypy.objspace.std.intobject import W_AbstractIntObject, W_IntObject
-from pypy.objspace.std.stdtypedef import StdTypeDef
class W_BoolObject(W_IntObject):
@@ -80,7 +80,7 @@
W_BoolObject.w_True = W_BoolObject(True)
-W_BoolObject.typedef = StdTypeDef("bool", W_IntObject.typedef,
+W_BoolObject.typedef = TypeDef("bool", W_IntObject.typedef,
__doc__ = """bool(x) -> bool
Returns True when the argument x is true, False otherwise.
diff --git a/pypy/objspace/std/bytearrayobject.py
b/pypy/objspace/std/bytearrayobject.py
--- a/pypy/objspace/std/bytearrayobject.py
+++ b/pypy/objspace/std/bytearrayobject.py
@@ -9,8 +9,8 @@
from pypy.interpreter.error import OperationError, oefmt
from pypy.interpreter.gateway import WrappedDefault, interp2app, unwrap_spec
from pypy.interpreter.signature import Signature
+from pypy.interpreter.typedef import TypeDef
from pypy.objspace.std.sliceobject import W_SliceObject
-from pypy.objspace.std.stdtypedef import StdTypeDef
from pypy.objspace.std.stringmethods import StringMethods
from pypy.objspace.std.util import get_positive_index
@@ -891,7 +891,7 @@
"""
-W_BytearrayObject.typedef = StdTypeDef(
+W_BytearrayObject.typedef = TypeDef(
"bytearray",
__doc__ = BytearrayDocstrings.__doc__,
__new__ = interp2app(W_BytearrayObject.descr_new),
diff --git a/pypy/objspace/std/bytesobject.py b/pypy/objspace/std/bytesobject.py
--- a/pypy/objspace/std/bytesobject.py
+++ b/pypy/objspace/std/bytesobject.py
@@ -10,10 +10,10 @@
from pypy.interpreter.error import OperationError, oefmt
from pypy.interpreter.gateway import (
WrappedDefault, interp2app, interpindirect2app, unwrap_spec)
+from pypy.interpreter.typedef import TypeDef
from pypy.objspace.std import newformat
from pypy.objspace.std.basestringtype import basestring_typedef
from pypy.objspace.std.formatting import mod_format
-from pypy.objspace.std.stdtypedef import StdTypeDef
from pypy.objspace.std.stringmethods import StringMethods
from pypy.objspace.std.unicodeobject import (
_get_encoding_and_errors, decode_object, unicode_from_encoded_object,
@@ -782,7 +782,7 @@
return W_BytesObject(c)
-W_BytesObject.typedef = StdTypeDef(
+W_BytesObject.typedef = TypeDef(
"str", basestring_typedef,
__new__ = interp2app(W_BytesObject.descr_new),
__doc__ = """str(object='') -> string
diff --git a/pypy/objspace/std/complexobject.py
b/pypy/objspace/std/complexobject.py
--- a/pypy/objspace/std/complexobject.py
+++ b/pypy/objspace/std/complexobject.py
@@ -3,9 +3,9 @@
from pypy.interpreter.baseobjspace import W_Root
from pypy.interpreter.error import OperationError, oefmt
from pypy.interpreter.gateway import interp2app, unwrap_spec, WrappedDefault
+from pypy.interpreter.typedef import GetSetProperty, TypeDef
from pypy.objspace.std import newformat
from pypy.objspace.std.floatobject import _hash_float
-from pypy.objspace.std.stdtypedef import GetSetProperty, StdTypeDef
from rpython.rlib import jit, rcomplex
from rpython.rlib.rarithmetic import intmask, r_ulonglong
from rpython.rlib.rbigint import rbigint
@@ -593,7 +593,7 @@
return space.newfloat(getattr(w_obj, name))
return GetSetProperty(fget)
-W_ComplexObject.typedef = StdTypeDef("complex",
+W_ComplexObject.typedef = TypeDef("complex",
__doc__ = """complex(real[, imag]) -> complex number
Create a complex number from a real part and an optional imaginary part.
diff --git a/pypy/objspace/std/dictmultiobject.py
b/pypy/objspace/std/dictmultiobject.py
--- a/pypy/objspace/std/dictmultiobject.py
+++ b/pypy/objspace/std/dictmultiobject.py
@@ -11,7 +11,7 @@
WrappedDefault, applevel, interp2app, unwrap_spec)
from pypy.interpreter.mixedmodule import MixedModule
from pypy.interpreter.signature import Signature
-from pypy.objspace.std.stdtypedef import StdTypeDef
+from pypy.interpreter.typedef import TypeDef
from pypy.objspace.std.util import negate
@@ -372,7 +372,7 @@
dictrepr = app.interphook("dictrepr")
-W_DictMultiObject.typedef = StdTypeDef("dict",
+W_DictMultiObject.typedef = TypeDef("dict",
__doc__ = '''dict() -> new empty dictionary.
dict(mapping) -> new dictionary initialized from a mapping object\'s
(key, value) pairs.
@@ -1216,7 +1216,7 @@
return space.newtuple([w_key, w_value])
raise OperationError(space.w_StopIteration, space.w_None)
-W_DictMultiIterItemsObject.typedef = StdTypeDef(
+W_DictMultiIterItemsObject.typedef = TypeDef(
"dict_iteritems",
__iter__ = interp2app(W_DictMultiIterItemsObject.descr_iter),
next = interp2app(W_DictMultiIterItemsObject.descr_next),
@@ -1224,7 +1224,7 @@
__reduce__ = interp2app(W_BaseDictMultiIterObject.descr_reduce),
)
-W_DictMultiIterKeysObject.typedef = StdTypeDef(
+W_DictMultiIterKeysObject.typedef = TypeDef(
"dict_iterkeys",
__iter__ = interp2app(W_DictMultiIterKeysObject.descr_iter),
next = interp2app(W_DictMultiIterKeysObject.descr_next),
@@ -1232,7 +1232,7 @@
__reduce__ = interp2app(W_BaseDictMultiIterObject.descr_reduce),
)
-W_DictMultiIterValuesObject.typedef = StdTypeDef(
+W_DictMultiIterValuesObject.typedef = TypeDef(
"dict_itervalues",
__iter__ = interp2app(W_DictMultiIterValuesObject.descr_iter),
next = interp2app(W_DictMultiIterValuesObject.descr_next),
@@ -1340,7 +1340,7 @@
def descr_iter(self, space):
return W_DictMultiIterValuesObject(space, self.w_dict.itervalues())
-W_DictViewItemsObject.typedef = StdTypeDef(
+W_DictViewItemsObject.typedef = TypeDef(
"dict_items",
__repr__ = interp2app(W_DictViewItemsObject.descr_repr),
__len__ = interp2app(W_DictViewItemsObject.descr_len),
@@ -1363,7 +1363,7 @@
__rxor__ = interp2app(W_DictViewItemsObject.descr_rxor),
)
-W_DictViewKeysObject.typedef = StdTypeDef(
+W_DictViewKeysObject.typedef = TypeDef(
"dict_keys",
__repr__ = interp2app(W_DictViewKeysObject.descr_repr),
__len__ = interp2app(W_DictViewKeysObject.descr_len),
@@ -1386,7 +1386,7 @@
__rxor__ = interp2app(W_DictViewKeysObject.descr_rxor),
)
-W_DictViewValuesObject.typedef = StdTypeDef(
+W_DictViewValuesObject.typedef = TypeDef(
"dict_values",
__repr__ = interp2app(W_DictViewValuesObject.descr_repr),
__len__ = interp2app(W_DictViewValuesObject.descr_len),
diff --git a/pypy/objspace/std/floatobject.py b/pypy/objspace/std/floatobject.py
--- a/pypy/objspace/std/floatobject.py
+++ b/pypy/objspace/std/floatobject.py
@@ -5,10 +5,9 @@
from pypy.interpreter.baseobjspace import W_Root
from pypy.interpreter.error import oefmt
from pypy.interpreter.gateway import interp2app, unwrap_spec, WrappedDefault
-from pypy.interpreter.typedef import GetSetProperty
+from pypy.interpreter.typedef import GetSetProperty, TypeDef
from pypy.objspace.std import newformat
from pypy.objspace.std.longobject import W_LongObject
-from pypy.objspace.std.stdtypedef import StdTypeDef
from pypy.objspace.std.util import wrap_parsestringerror
from rpython.rlib import rarithmetic, rfloat
from rpython.rlib.rarithmetic import ovfcheck_float_to_int, intmask, LONG_BIT
@@ -641,7 +640,7 @@
return space.wrap("0x%sp%s%d" % (s, sign, exp))
-W_FloatObject.typedef = StdTypeDef("float",
+W_FloatObject.typedef = TypeDef("float",
__doc__ = '''float(x) -> floating point number
Convert a string or number to a floating point number, if possible.''',
diff --git a/pypy/objspace/std/intobject.py b/pypy/objspace/std/intobject.py
--- a/pypy/objspace/std/intobject.py
+++ b/pypy/objspace/std/intobject.py
@@ -21,8 +21,8 @@
from pypy.interpreter.buffer import Buffer
from pypy.interpreter.error import OperationError, oefmt
from pypy.interpreter.gateway import WrappedDefault, interp2app, unwrap_spec
+from pypy.interpreter.typedef import TypeDef
from pypy.objspace.std import newformat
-from pypy.objspace.std.stdtypedef import StdTypeDef
from pypy.objspace.std.util import (
BINARY_OPS, CMP_OPS, COMMUTATIVE_OPS, IDTAG_INT, wrap_parsestringerror)
@@ -718,7 +718,7 @@
return w_obj
-W_IntObject.typedef = StdTypeDef("int",
+W_IntObject.typedef = TypeDef("int",
__doc__ = """int(x=0) -> int or long
int(x, base=10) -> int or long
diff --git a/pypy/objspace/std/iterobject.py b/pypy/objspace/std/iterobject.py
--- a/pypy/objspace/std/iterobject.py
+++ b/pypy/objspace/std/iterobject.py
@@ -3,7 +3,7 @@
from pypy.interpreter.baseobjspace import W_Root
from pypy.interpreter.gateway import interp2app, interpindirect2app
from pypy.interpreter.error import OperationError
-from pypy.objspace.std.stdtypedef import StdTypeDef
+from pypy.interpreter.typedef import TypeDef
class W_AbstractSeqIterObject(W_Root):
@@ -44,7 +44,7 @@
def descr_length_hint(self, space):
return self.getlength(space)
-W_AbstractSeqIterObject.typedef = StdTypeDef(
+W_AbstractSeqIterObject.typedef = TypeDef(
"sequenceiterator",
__doc__ = '''iter(collection) -> iterator
iter(callable, sentinel) -> iterator
@@ -167,7 +167,7 @@
raise OperationError(space.w_StopIteration, space.w_None)
return w_item
-W_ReverseSeqIterObject.typedef = StdTypeDef(
+W_ReverseSeqIterObject.typedef = TypeDef(
"reversesequenceiterator",
__iter__ = interp2app(W_ReverseSeqIterObject.descr_iter),
next = interp2app(W_ReverseSeqIterObject.descr_next),
diff --git a/pypy/objspace/std/listobject.py b/pypy/objspace/std/listobject.py
--- a/pypy/objspace/std/listobject.py
+++ b/pypy/objspace/std/listobject.py
@@ -16,6 +16,7 @@
interp2app)
from pypy.interpreter.generator import GeneratorIterator
from pypy.interpreter.signature import Signature
+from pypy.interpreter.typedef import TypeDef
from pypy.objspace.std.bytesobject import W_BytesObject
from pypy.objspace.std.floatobject import W_FloatObject
from pypy.objspace.std.intobject import W_IntObject
@@ -23,7 +24,6 @@
W_ReverseSeqIterObject)
from pypy.objspace.std.sliceobject import (W_SliceObject, unwrap_start_stop,
normalize_simple_slice)
-from pypy.objspace.std.stdtypedef import StdTypeDef
from pypy.objspace.std.tupleobject import W_AbstractTupleObject
from pypy.objspace.std.unicodeobject import W_UnicodeObject
from pypy.objspace.std.util import get_positive_index, negate
@@ -1758,7 +1758,7 @@
return CustomCompareSort.lt(self, a.w_key, b.w_key)
-W_ListObject.typedef = StdTypeDef("list",
+W_ListObject.typedef = TypeDef("list",
__doc__ = """list() -> new list
list(sequence) -> new list initialized from sequence's items""",
__new__ = interp2app(W_ListObject.descr_new),
diff --git a/pypy/objspace/std/longobject.py b/pypy/objspace/std/longobject.py
--- a/pypy/objspace/std/longobject.py
+++ b/pypy/objspace/std/longobject.py
@@ -13,9 +13,9 @@
from pypy.interpreter.error import OperationError, oefmt
from pypy.interpreter.gateway import (
WrappedDefault, interp2app, interpindirect2app, unwrap_spec)
+from pypy.interpreter.typedef import TypeDef
from pypy.objspace.std import newformat
from pypy.objspace.std.intobject import W_AbstractIntObject
-from pypy.objspace.std.stdtypedef import StdTypeDef
from pypy.objspace.std.util import (
BINARY_OPS, CMP_OPS, COMMUTATIVE_OPS, IDTAG_LONG, wrap_parsestringerror)
@@ -563,7 +563,7 @@
return w_obj
-W_AbstractLongObject.typedef = StdTypeDef("long",
+W_AbstractLongObject.typedef = TypeDef("long",
__doc__ = """long(x=0) -> long
long(x, base=10) -> long
diff --git a/pypy/objspace/std/noneobject.py b/pypy/objspace/std/noneobject.py
--- a/pypy/objspace/std/noneobject.py
+++ b/pypy/objspace/std/noneobject.py
@@ -1,6 +1,6 @@
from pypy.interpreter.baseobjspace import W_Root
from pypy.interpreter.gateway import interp2app
-from pypy.objspace.std.stdtypedef import StdTypeDef
+from pypy.interpreter.typedef import TypeDef
class W_NoneObject(W_Root):
@@ -16,7 +16,7 @@
W_NoneObject.w_None = W_NoneObject()
-W_NoneObject.typedef = StdTypeDef("NoneType",
+W_NoneObject.typedef = TypeDef("NoneType",
__nonzero__ = interp2app(W_NoneObject.descr_nonzero),
__repr__ = interp2app(W_NoneObject.descr_repr),
)
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
@@ -1,9 +1,8 @@
from pypy.interpreter.baseobjspace import W_Root
from pypy.interpreter.error import OperationError, oefmt
from pypy.interpreter.gateway import applevel, interp2app, unwrap_spec
-from pypy.interpreter.typedef import GetSetProperty, default_identity_hash
+from pypy.interpreter.typedef import GetSetProperty, default_identity_hash,
TypeDef
from pypy.objspace.descroperation import Object
-from pypy.objspace.std.stdtypedef import StdTypeDef
app = applevel(r'''
@@ -210,7 +209,7 @@
return space.format(w_as_str, w_format_spec)
-W_ObjectObject.typedef = StdTypeDef("object",
+W_ObjectObject.typedef = TypeDef("object",
__doc__ = "The most base type",
__new__ = interp2app(descr__new__),
__subclasshook__ = interp2app(descr___subclasshook__, as_classmethod=True),
diff --git a/pypy/objspace/std/setobject.py b/pypy/objspace/std/setobject.py
--- a/pypy/objspace/std/setobject.py
+++ b/pypy/objspace/std/setobject.py
@@ -1,10 +1,10 @@
from pypy.interpreter import gateway
+from pypy.interpreter.baseobjspace import W_Root
from pypy.interpreter.error import OperationError
from pypy.interpreter.signature import Signature
-from pypy.interpreter.baseobjspace import W_Root
+from pypy.interpreter.typedef import TypeDef
from pypy.objspace.std.bytesobject import W_BytesObject
from pypy.objspace.std.intobject import W_IntObject
-from pypy.objspace.std.stdtypedef import StdTypeDef
from pypy.objspace.std.unicodeobject import W_UnicodeObject
from rpython.rlib.objectmodel import r_dict
@@ -515,7 +515,7 @@
W_SetObject.__init__(w_obj, space)
return w_obj
-W_SetObject.typedef = StdTypeDef("set",
+W_SetObject.typedef = TypeDef("set",
__doc__ = """set(iterable) --> set object
Build an unordered collection.""",
@@ -616,7 +616,7 @@
return space.wrap(hash)
-W_FrozensetObject.typedef = StdTypeDef("frozenset",
+W_FrozensetObject.typedef = TypeDef("frozenset",
__doc__ = """frozenset(iterable) --> frozenset object
Build an immutable unordered collection.""",
@@ -1521,7 +1521,7 @@
return w_key
raise OperationError(space.w_StopIteration, space.w_None)
-W_SetIterObject.typedef = StdTypeDef("setiterator",
+W_SetIterObject.typedef = TypeDef("setiterator",
__length_hint__ = gateway.interp2app(W_SetIterObject.descr_length_hint),
__iter__ = gateway.interp2app(W_SetIterObject.descr_iter),
next = gateway.interp2app(W_SetIterObject.descr_next)
diff --git a/pypy/objspace/std/sliceobject.py b/pypy/objspace/std/sliceobject.py
--- a/pypy/objspace/std/sliceobject.py
+++ b/pypy/objspace/std/sliceobject.py
@@ -3,8 +3,7 @@
from pypy.interpreter import gateway
from pypy.interpreter.baseobjspace import W_Root
from pypy.interpreter.error import OperationError
-from pypy.interpreter.typedef import GetSetProperty
-from pypy.objspace.std.stdtypedef import StdTypeDef
+from pypy.interpreter.typedef import GetSetProperty, TypeDef
from rpython.rlib.objectmodel import specialize
@@ -170,7 +169,7 @@
return getattr(w_obj, name)
return GetSetProperty(fget)
-W_SliceObject.typedef = StdTypeDef("slice",
+W_SliceObject.typedef = TypeDef("slice",
__doc__ = '''slice([start,] stop[, step])
Create a slice object. This is used for extended slicing (e.g. a[0:10:2]).''',
diff --git a/pypy/objspace/std/stdtypedef.py b/pypy/objspace/std/stdtypedef.py
--- a/pypy/objspace/std/stdtypedef.py
+++ b/pypy/objspace/std/stdtypedef.py
@@ -1,11 +1,5 @@
-from pypy.interpreter.typedef import TypeDef, GetSetProperty, Member
from pypy.interpreter.baseobjspace import SpaceCache
-__all__ = ['StdTypeDef']
-
-
-StdTypeDef = TypeDef
-
class TypeCache(SpaceCache):
def build(cache, typedef):
diff --git a/pypy/objspace/std/strbufobject.py
b/pypy/objspace/std/strbufobject.py
--- a/pypy/objspace/std/strbufobject.py
+++ b/pypy/objspace/std/strbufobject.py
@@ -2,9 +2,7 @@
import py
-from pypy.objspace.std.basestringtype import basestring_typedef
from pypy.objspace.std.bytesobject import W_AbstractBytesObject, W_BytesObject
-from pypy.objspace.std.stdtypedef import StdTypeDef
from pypy.interpreter.gateway import interp2app, unwrap_spec
from rpython.rlib.rstring import StringBuilder
diff --git a/pypy/objspace/std/test/test_typeobject.py
b/pypy/objspace/std/test/test_typeobject.py
--- a/pypy/objspace/std/test/test_typeobject.py
+++ b/pypy/objspace/std/test/test_typeobject.py
@@ -1,6 +1,6 @@
from pypy.interpreter.baseobjspace import W_Root
from pypy.interpreter.gateway import interp2app
-from pypy.objspace.std.stdtypedef import StdTypeDef
+from pypy.interpreter.typedef import TypeDef
class TestTypeObject:
@@ -10,7 +10,7 @@
pass
def descr__new__(space, w_subtype):
return space.allocate_instance(W_Stuff, w_subtype)
- W_Stuff.typedef = StdTypeDef("stuff",
+ W_Stuff.typedef = TypeDef("stuff",
__new__ = interp2app(descr__new__))
W_Stuff.typedef.acceptable_as_base_class = False
w_stufftype = space.gettypeobject(W_Stuff.typedef)
diff --git a/pypy/objspace/std/tupleobject.py b/pypy/objspace/std/tupleobject.py
--- a/pypy/objspace/std/tupleobject.py
+++ b/pypy/objspace/std/tupleobject.py
@@ -6,9 +6,9 @@
from pypy.interpreter.error import OperationError
from pypy.interpreter.gateway import (
WrappedDefault, interp2app, interpindirect2app, unwrap_spec)
+from pypy.interpreter.typedef import TypeDef
from pypy.objspace.std.sliceobject import (W_SliceObject, unwrap_start_stop,
normalize_simple_slice)
-from pypy.objspace.std.stdtypedef import StdTypeDef
from pypy.objspace.std.util import negate
from rpython.rlib import jit
from rpython.rlib.debug import make_sure_not_resized
@@ -210,7 +210,7 @@
raise OperationError(space.w_ValueError,
space.wrap("tuple.index(x): x not in tuple"))
-W_AbstractTupleObject.typedef = StdTypeDef(
+W_AbstractTupleObject.typedef = TypeDef(
"tuple",
__doc__ = """tuple() -> an empty tuple
tuple(sequence) -> tuple initialized from sequence's items
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
@@ -3,10 +3,8 @@
from pypy.interpreter.error import oefmt, OperationError
from pypy.interpreter.function import Function, StaticMethod
from pypy.interpreter.typedef import weakref_descr, GetSetProperty,\
- descr_get_dict, dict_descr
+ descr_get_dict, dict_descr, Member, TypeDef
from pypy.interpreter.astcompiler.misc import mangle
-from pypy.objspace.std.stdtypedef import Member
-from pypy.objspace.std.stdtypedef import StdTypeDef
from rpython.rlib.jit import (promote, elidable_promote, we_are_jitted,
promote_string, elidable, dont_look_inside, unroll_safe)
@@ -850,7 +848,7 @@
def type_isinstance(w_obj, space, w_inst):
return space.newbool(space.type(w_inst).issubtype(w_obj))
-W_TypeObject.typedef = StdTypeDef("type",
+W_TypeObject.typedef = TypeDef("type",
__new__ = gateway.interp2app(descr__new__),
__name__ = GetSetProperty(descr_get__name__, descr_set__name__),
__bases__ = GetSetProperty(descr_get__bases__, descr_set__bases__),
diff --git a/pypy/objspace/std/unicodeobject.py
b/pypy/objspace/std/unicodeobject.py
--- a/pypy/objspace/std/unicodeobject.py
+++ b/pypy/objspace/std/unicodeobject.py
@@ -11,11 +11,11 @@
from pypy.interpreter.baseobjspace import W_Root
from pypy.interpreter.error import OperationError, oefmt
from pypy.interpreter.gateway import WrappedDefault, interp2app, unwrap_spec
+from pypy.interpreter.typedef import TypeDef
from pypy.module.unicodedata import unicodedb
from pypy.objspace.std import newformat
from pypy.objspace.std.basestringtype import basestring_typedef
from pypy.objspace.std.formatting import mod_format
-from pypy.objspace.std.stdtypedef import StdTypeDef
from pypy.objspace.std.stringmethods import StringMethods
__all__ = ['W_UnicodeObject', 'wrapunicode', 'plain_str2unicode',
@@ -915,7 +915,7 @@
"""
-W_UnicodeObject.typedef = StdTypeDef(
+W_UnicodeObject.typedef = TypeDef(
"unicode", basestring_typedef,
__new__ = interp2app(W_UnicodeObject.descr_new),
__doc__ = UnicodeDocstrings.__doc__,
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit