[issue10379] locale.format() input regression

2017-04-19 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue10379] locale.format() input regression

2017-04-19 Thread Berker Peksag
Berker Peksag added the comment: New changeset 6dbdedb0b18a5ca850ab8ce512fda24d5a9d0688 by Berker Peksag in branch 'master': bpo-10379: Add %char examples to locale.format() docs (GH-1145) https://github.com/python/cpython/commit/6dbdedb0b18a5ca850ab8ce512fda24d5a9d0688 --

[issue10379] locale.format() input regression

2017-04-14 Thread Berker Peksag
Berker Peksag added the comment: I think the solution in PR 259 is great, but I still find the documentation a little bit vague. I've just opened PR 1145 to add some examples specifiers. -- nosy: +berker.peksag stage: needs patch -> patch review versions: +Python 3.7 -Python 2.7,

[issue10379] locale.format() input regression

2017-04-14 Thread Berker Peksag
Changes by Berker Peksag : -- pull_requests: +1276 ___ Python tracker ___ ___

[issue10379] locale.format() input regression

2017-03-28 Thread R. David Murray
R. David Murray added the comment: Oops. I merged the patch without coming back here first :(. Still getting used to the new workflow. It turns out that format has a parameter, monetary, that isn't supported by format_string. So what we did was add that parameter to format_string and

[issue10379] locale.format() input regression

2017-03-28 Thread R. David Murray
R. David Murray added the comment: New changeset 1cf93a76c2cf307f2e1e514a8944864f746337ea by R. David Murray (Garvit Khatri) in branch 'master': bpo-10379: add 'monetary' to format_string, deprecate format https://github.com/python/cpython/commit/1cf93a76c2cf307f2e1e514a8944864f746337ea

[issue10379] locale.format() input regression

2017-03-28 Thread R. David Murray
Changes by R. David Murray : -- stage: backport needed -> needs patch ___ Python tracker ___

[issue10379] locale.format() input regression

2017-03-28 Thread R. David Murray
Changes by R. David Murray : -- stage: needs patch -> backport needed ___ Python tracker ___

[issue10379] locale.format() input regression

2017-02-23 Thread Garvit Khatri
Changes by Garvit Khatri : -- pull_requests: +229 ___ Python tracker ___ ___

[issue10379] locale.format() input regression

2016-11-23 Thread Eric V. Smith
Changes by Eric V. Smith : -- assignee: docs@python -> keywords: +easy stage: -> needs patch type: -> behavior ___ Python tracker

[issue10379] locale.format() input regression

2016-11-23 Thread Eric V. Smith
Changes by Eric V. Smith : -- versions: +Python 3.5, Python 3.6 -Python 3.3, Python 3.4 ___ Python tracker ___

[issue10379] locale.format() input regression

2016-11-23 Thread Wolfgang Maier
Changes by Wolfgang Maier : -- nosy: +wolma ___ Python tracker ___

[issue10379] locale.format() input regression

2013-04-02 Thread Eric V. Smith
Eric V. Smith added the comment: Barry meant that the upstream program that triggered this error has been changed to call format_string() instead of format(). The bug still exists in format(). My suggestion is to have format() be an alias for format_string(). Deprecating format() is an

[issue10379] locale.format() input regression

2013-04-02 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Apr 02, 2013, at 11:32 AM, Eric V. Smith wrote: My suggestion is to have format() be an alias for format_string(). Deprecating format() is an optional step, but may not be worth the hassle. Agreed on both counts. --

[issue10379] locale.format() input regression

2013-04-02 Thread Eric V. Smith
Eric V. Smith added the comment: So I guess the question is: would this be a bug fix and applied to 2.7 and 3.3, or just an enhancement for 3.4? I think it would be a bug fix and thus should be backported. It's not like we'd be breaking any working code, unless it was expecting the exception.

[issue10379] locale.format() input regression

2013-04-02 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Apr 02, 2013, at 03:04 PM, Eric V. Smith wrote: I think it would be a bug fix and thus should be backported. It's not like we'd be breaking any working code, unless it was expecting the exception. That would be my preference. --

[issue10379] locale.format() input regression

2013-04-01 Thread Mark Lawrence
Mark Lawrence added the comment: msg120978 The bug has been fixed upstream Have I missed something as on Windows Vista...? c:\Users\Mark\MyPythonpython Python 3.3.1rc1 (v3.3.1rc1:92c2cfb92405, Mar 25 2013, 22:39:19) [MSC v.1600 32 bit (Intel)] on win32 Type help, copyright, credits or

[issue10379] locale.format() input regression

2010-11-11 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Yeah, obviously that language can be improved. 'exactly' was meant to imply 'nothing but', but clearly it doesn't. If we want to restore more stringent backward compatibility and allow trailing text, it would be possible to make format

[issue10379] locale.format() input regression

2010-11-11 Thread Łukasz Langa
Łukasz Langa luk...@langa.pl added the comment: Please use the deprecation process when possible. That would mean creating an alias for the function you want to remove somewhat like this (taken from configparser): def readfp(self, fp, filename=None): Deprecated, use

[issue10379] locale.format() input regression

2010-11-11 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: The bug has been fixed upstream by replacing .format() with .format_string(). I'm not sure I understand why there are two different methods - .format() seems kind of pointless to me, but then I don't use the locale module enough to say

[issue10379] locale.format() input regression

2010-11-11 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Well, the distinction is that, before the bug fix that caused your issue, the 'format_string' method would use a regex to extract the % specifiers from the input string, and call 'format' to replace that % specifier with a properly

[issue10379] locale.format() input regression

2010-11-11 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: On Nov 12, 2010, at 12:15 AM, R. David Murray wrote: Now, from the perspective of a *user* of the locale module, I fail to see the point in having both 'format' and 'format_string' exposed. If you want to format a single % specifier, just

[issue10379] locale.format() input regression

2010-11-09 Thread Barry A. Warsaw
New submission from Barry A. Warsaw ba...@python.org: @mission[~:1001]% python2.7 -c import locale; print locale.format('%.0f KB', 100) Traceback (most recent call last): File string, line 1, in module File /usr/lib/python2.7/locale.py, line 189, in format format specifier, %s not

[issue10379] locale.format() input regression

2010-11-09 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This was changed by issue2522 on purpose; no suffix is allowed in locale.format(). -- nosy: +amaury.forgeotdarc, r.david.murray ___ Python tracker rep...@bugs.python.org

[issue10379] locale.format() input regression

2010-11-09 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: Okay, so line 187 of locale.py has this test: if not match or len(match.group())!= len(percent): the problematic part is the len test. When format string is '%.0f KB' match.group() is '%.0f' but of course percent is the full string.

[issue10379] locale.format() input regression

2010-11-09 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10379 ___ ___ Python-bugs-list

[issue10379] locale.format() input regression

2010-11-09 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: Hmm. So I guess the answer is to use locale.format_string() instead. But the documentation for locale.format() is not entirely clear about the prohibition on trailing text. -- ___ Python tracker

[issue10379] locale.format() input regression

2010-11-09 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I agree the documentation isn't terribly clear on what a %char specifier or whole format string is. FWIW, this is also a 3.1 and greater issue. -- versions: +Python 3.1, Python 3.2 ___ Python tracker

[issue10379] locale.format() input regression

2010-11-09 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- assignee: - d...@python components: +Documentation nosy: +d...@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10379 ___