Author: Armin Rigo <ar...@tunes.org>
Branch: py3.5
Changeset: r90194:6d2b0db1c9cd
Date: 2017-02-19 10:33 +0100
http://bitbucket.org/pypy/pypy/changeset/6d2b0db1c9cd/

Log:    fix

diff --git a/pypy/objspace/std/formatting.py b/pypy/objspace/std/formatting.py
--- a/pypy/objspace/std/formatting.py
+++ b/pypy/objspace/std/formatting.py
@@ -457,7 +457,7 @@
             if do_unicode:
                 value = self.space.unicode_w(w_value)
             else:
-                value = self.space.bytes_w(w_value)
+                value = self.space.text_w(w_value)
             self.std_wp(value)
 
         def fmt_c(self, w_value):
diff --git a/pypy/objspace/std/test/test_stringformat.py 
b/pypy/objspace/std/test/test_stringformat.py
--- a/pypy/objspace/std/test/test_stringformat.py
+++ b/pypy/objspace/std/test/test_stringformat.py
@@ -408,6 +408,7 @@
         assert b"<%a>" % b"\xe9" == b"<b'\\xe9'>"
         assert b"<%a>" % "foo" == b"<'foo'>"
         assert b"<%a>" % "\u1234" == b"<'\\u1234'>"
+        assert b"<%a>" % 3.14 == b"<3.14>"
 
     def test_r_compat_bytes(self):
         assert b"<%r>" % b"test" == b"<b'test'>"
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to