Author: Ronan Lamy <[email protected]>
Branch: py3.5
Changeset: r88956:dd254ac1fd69
Date: 2016-12-07 18:07 +0000
http://bitbucket.org/pypy/pypy/changeset/dd254ac1fd69/
Log: Fix qualname computation
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
@@ -166,7 +166,7 @@
overridetypedef=None, force_new_layout=False):
self.space = space
self.name = name
- self.qualname = name.decode('utf-8')
+ self.qualname = None
self.bases_w = bases_w
self.dict_w = dict_w
self.hasdict = False
@@ -1181,6 +1181,8 @@
w_qualname = w_self.dict_w.pop('__qualname__', None)
if w_qualname is not None:
w_self.qualname = w_self.space.unicode_w(w_qualname)
+ else:
+ w_self.qualname = w_self.getname(w_self.space)
ensure_common_attributes(w_self)
return layout
@@ -1189,6 +1191,7 @@
w_self.hasdict = instancetypedef.hasdict
w_self.weakrefable = instancetypedef.weakrefable
w_self.w_doc = w_self.space.wrap(instancetypedef.doc)
+ w_self.qualname = w_self.getname(w_self.space)
ensure_common_attributes(w_self)
w_self.flag_heaptype = instancetypedef.heaptype
#
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit