cpython: a06654ca0134 (original) (raw)

Mercurial > cpython

changeset 100906:a06654ca0134 2.7

Issue #13410: Fixed a bug in PyUnicode_Format where it failed to properly ignore errors from a __int__() method. Patch based on the patch for issue #15516. [#13410]

Serhiy Storchaka storchaka@gmail.com
date Sun, 10 Apr 2016 15:26:52 +0300
parents 4dc347c5c8a8
children 9cf8572abe58
files Lib/test/test_format.py Misc/NEWS Objects/unicodeobject.c
diffstat 3 files changed, 8 insertions(+), 1 deletions(-)[+] [-] Lib/test/test_format.py 1 Misc/NEWS 3 Objects/unicodeobject.c 5

line wrap: on

line diff

--- a/Lib/test/test_format.py +++ b/Lib/test/test_format.py @@ -243,6 +243,7 @@ class FormatTest(unittest.TestCase): fst = IntFails() testformat("%x", fst, '0')

# Test exception for unknown format characters if verbose:

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,9 @@ What's New in Python 2.7.12? Core and Builtins ----------------- +- Issue #13410: Fixed a bug in PyUnicode_Format where it failed to properly

--- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -8632,7 +8632,10 @@ PyObject *PyUnicode_Format(PyObject *for } else { iobj = PyNumber_Int(v);