[pypy-commit] pypy py3.5: encode the type name to bytes for interpolation
exarkun
pypy.commits at gmail.com
Mon Jul 31 15:00:44 EDT 2017
Author: Jean-Paul Calderone <exarkun at twistedmatrix.com>
Branch: py3.5
Changeset: r92002:22c27ed7a494
Date: 2017-07-31 14:59 -0400
http://bitbucket.org/pypy/pypy/changeset/22c27ed7a494/
Log: encode the type name to bytes for interpolation
fixes annotator error:
string formatting mixing strings and unicode not supported
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
@@ -752,7 +752,7 @@
def _get_printable_location(w_type):
return ('bytearray_from_byte_sequence [w_type=%s]' %
- w_type.getname(w_type.space))
+ w_type.getname(w_type.space).encode('utf-8'))
_byteseq_jitdriver = jit.JitDriver(
name='bytearray_from_byte_sequence',
More information about the pypy-commit
mailing list