[issue29955] logging decimal point should come from locale

2017-04-06 Thread Vinay Sajip
Vinay Sajip added the comment: > and provides no straightforward API for me to reconfigure its logger. As far as I know, you just need to do something which configures a Flask logger, then call logging.config.dictConfig() with a suitable configuration which doesn't disable existing loggers and

[issue29955] logging decimal point should come from locale

2017-04-06 Thread Skip Montanaro
Skip Montanaro added the comment: Vinay> I would like to close this issue now... Go for it. As I indicated in a previous comment, the exercise was as much to try and come to grips with the process as to actually make the change. There certainly appear to be good reasons to leave well enough alo

[issue29955] logging decimal point should come from locale

2017-04-06 Thread Vinay Sajip
Vinay Sajip added the comment: I would like to close this issue now, without making changes. Will do in one day, unless someone pipes up. -- resolution: -> not a bug status: open -> pending ___ Python tracker ___

[issue29955] logging decimal point should come from locale

2017-04-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Since the date format itself isn't localized (fortunately), there is no reason to localize the decimal point either. People wanting a localized logging format can easily override the default configuration. And this proposal would break compatibility with exi

[issue29955] logging decimal point should come from locale

2017-04-01 Thread Vinay Sajip
Vinay Sajip added the comment: I would prefer to keep things as they are - which is conforming to the preferences expressed in ISO 8601, and preserving backwards compatibility. I agree that a period has some advantages, but I went with what the standard said as closely as I could. I'm not sure

[issue29955] logging decimal point should come from locale

2017-03-31 Thread Xiang Zhang
Xiang Zhang added the comment: Although I prefer period but such a change could break backwards compatibility so I don't know it's worth or not. Codes like `datetime.strptime('1993-04-21 08:03:00,123', '%Y-%m-%d %H:%M:%S,%f')` (usually for such a simple parse goal I like to use the builtin dat

[issue29955] logging decimal point should come from locale

2017-03-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 for changing this to a period. Every time I see the comma, it seems odd to me. It also is harder to parse back into a regular float. In addition, it is hazard when people use commas and delimiters between the fields in a log file. -- nosy: +rh

[issue29955] logging decimal point should come from locale

2017-03-31 Thread Skip Montanaro
Skip Montanaro added the comment: One example demonstrating that the datetime module at least prefers a decimal point: >>> import dateutil.parser >>> t = '1993-04-21 08:03:00,123' >>> dateutil.parser.parse(t) datetime.datetime(1993, 4, 21, 8, 3, 0, 123000) >>> dateutil.parser.parse(t).isoformat

[issue29955] logging decimal point should come from locale

2017-03-31 Thread Skip Montanaro
Skip Montanaro added the comment: It's Vinay's code, so what he wants should carry the most weight. I did this as much as an exercise in figuring out the whole pull request/bug report process as anything. -- ___ Python tracker

[issue29955] logging decimal point should come from locale

2017-03-31 Thread Vinay Sajip
Vinay Sajip added the comment: It's not exactly a decimal point, more a "decimal mark" as per ISO 8601. From the Wikipedia article for the standard at "https://en.wikipedia.org/wiki/ISO_8601#Times - "However, a fraction may only be added to the lowest order time element in the representation

[issue29955] logging decimal point should come from locale

2017-03-31 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +1116 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue29955] logging decimal point should come from locale

2017-03-31 Thread Skip Montanaro
New submission from Skip Montanaro: The logging module hard codes the decimal point for timestamps to be ",". It should use locale.localeconv()["decimal_point"] instead. -- components: Library (Lib) messages: 290927 nosy: skip.montanaro priority: normal severity: normal status: open tit