Author: Matti Picus <[email protected]>
Branch: unicode-utf8-py3
Changeset: r94966:9099e13cc646
Date: 2018-08-07 00:17 -0700
http://bitbucket.org/pypy/pypy/changeset/9099e13cc646/
Log: unicode -> utf8
diff --git a/pypy/module/_codecs/locale.py b/pypy/module/_codecs/locale.py
--- a/pypy/module/_codecs/locale.py
+++ b/pypy/module/_codecs/locale.py
@@ -57,7 +57,7 @@
if errorpos == -1:
raise MemoryError
errmsg = _errmsg("pypy_wchar2char")
- errorhandler('strict', 'filesystemencoding', errmsg,
u.encode('utf8'),
+ errorhandler('strict', 'filesystemencoding', errmsg, u,
errorpos, errorpos + 1)
return rffi.charp2str(sbuf)
finally:
diff --git a/pypy/module/_io/interp_textio.py b/pypy/module/_io/interp_textio.py
--- a/pypy/module/_io/interp_textio.py
+++ b/pypy/module/_io/interp_textio.py
@@ -856,7 +856,7 @@
text_needflush = False
if self.write_through:
text_needflush = True
- if self.line_buffering and (haslf or text.find(u'\r') >= 0):
+ if self.line_buffering and (haslf or text.find('\r') >= 0):
needflush = True
# XXX What if we were just reading?
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
@@ -1454,7 +1454,7 @@
names = [cls.getname(space) for cls in cycle]
# Can't use oefmt() here, since names is a list of unicodes
raise OperationError(space.w_TypeError, space.newtext(
- u"cycle among base classes: " + u' < '.join(names)))
+ "cycle among base classes: " + ' < '.join(names)))
class TypeCache(SpaceCache):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit