Author: Matti Picus <matti.pi...@gmail.com> Branch: unicode-utf8-py3 Changeset: r95766:5dd0a0074920 Date: 2019-02-01 13:07 +0200 http://bitbucket.org/pypy/pypy/changeset/5dd0a0074920/
Log: is this code needed (tests in pypy/interpreter, pypy/objspace pass without it)? diff --git a/TODO b/TODO --- a/TODO +++ b/TODO @@ -7,7 +7,7 @@ * revisit why runicode import str_decode_utf_8_impl needed instead of runicode import str_decode_utf_8 * revisit all places where we do utf8.decode('utf-8'), they should work - directly with utf8 + directly with utf8 (can be converted via runicode.str_decode_utf_8 as well) - rutf8.utf8_encode_mbcs - unicodehelper.fsencode - unicodehelper.unicode_to_decimal_w diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py --- a/pypy/interpreter/baseobjspace.py +++ b/pypy/interpreter/baseobjspace.py @@ -838,7 +838,6 @@ # returns a "text" object (ie str in python2 and unicode in python3) if not we_are_translated(): assert type(s) is str - #u = s.decode('utf-8') w_s1 = self.interned_strings.get(s) if w_s1 is None: w_s1 = self.newtext(s) @@ -882,10 +881,6 @@ # interface for marshal_impl if not we_are_translated(): assert type(s) is str - try: - u = s.decode('utf-8') - except UnicodeDecodeError: - return None return self.interned_strings.get(s) # may be None @specialize.arg(1) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit