Author: Armin Rigo <ar...@tunes.org> Branch: py3.5-newtext Changeset: r90099:135e906c0b0c Date: 2017-02-13 18:52 +0100 http://bitbucket.org/pypy/pypy/changeset/135e906c0b0c/
Log: hg merge 5fef2e96ef36 diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py --- a/pypy/interpreter/baseobjspace.py +++ b/pypy/interpreter/baseobjspace.py @@ -630,7 +630,7 @@ if not e.match(self, self.w_StopIteration): raise break - name = self.str_w(w_name) + name = self.text_w(w_name) if not name.startswith('__'): excname = name w_exc = self.getitem(w_dic, w_name) diff --git a/pypy/interpreter/pycode.py b/pypy/interpreter/pycode.py --- a/pypy/interpreter/pycode.py +++ b/pypy/interpreter/pycode.py @@ -26,7 +26,7 @@ # helper def unpack_str_tuple(space,w_str_tuple): - return [space.str_w(w_el) for w_el in space.unpackiterable(w_str_tuple)] + return [space.text_w(w_el) for w_el in space.unpackiterable(w_str_tuple)] # Magic numbers for the bytecode version in code objects. diff --git a/pypy/interpreter/test/test_argument.py b/pypy/interpreter/test/test_argument.py --- a/pypy/interpreter/test/test_argument.py +++ b/pypy/interpreter/test/test_argument.py @@ -95,10 +95,13 @@ def wrap(self, obj): return obj newtext = wrap + newunicode = wrap def str_w(self, s): return str(s) - text_w = str_w + + def text_w(self, s): + return self.str_w(s) def unicode_w(self, s): return unicode(s) 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 @@ -26,8 +26,8 @@ return True if self.user_overridden_class or w_other.user_overridden_class: return False - s1 = space.str_w(self) - s2 = space.str_w(w_other) + s1 = space.bytes_w(self) + s2 = space.bytes_w(w_other) if len(s2) > 1: return s1 is s2 else: # strings of len <= 1 are unique-ified @@ -36,7 +36,7 @@ def immutable_unique_id(self, space): if self.user_overridden_class: return None - s = space.str_w(self) + s = space.bytes_w(self) if len(s) > 1: uid = compute_unique_id(s) else: # strings of len <= 1 are unique-ified 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 @@ -518,7 +518,7 @@ return _new_int(space, w_inttype, w_x, w_base) def descr_hash(self, space): - return space.wrap(_hash_int(self.intval)) + return space.newint(_hash_int(self.intval)) def as_w_long(self, space): return space.newlong(self.intval) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit