Title: logging doesn't support format flags for asctime keyword, but the docs use them
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.2, Python 3.3
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: vinay.sajip Nosy List: akira, eric.araujo, vinay.sajip
Priority: normal Keywords: patch

Created on 2011-02-26 10:52 by akira, last changed 2011-02-26 16:06 by vinay.sajip. This issue is now closed.

File name Uploaded Description Edit
doc-logging-asctime-r88640.patch akira, 2011-02-26 10:52 fix asctime format flags in the docs; patch for r88640
Messages (5)
msg129524 - (view) Author: Akira Li (akira) * Date: 2011-02-26 10:52
Since Python 3.2 logging package doesn't support formatting flags for the `asctime` keyword, but the documentation uses them. For example in Doc/library/logging.rst:

  FORMAT = '%(asctime)-15s %(clientip)s %(user)-8s %(message)s'

should be replaced by:

  FORMAT = '%(asctime)s %(clientip)s %(user)-8s %(message)s'

The attached file 'doc-logging-asctime-r88640.patch' contains necessary changes.

An alternative solution would be to fix the logging package to restore the support.
msg129551 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2011-02-26 14:18
Fix checked into py3k and release32-maint (r88644). Support was reinstated - the docs weren't changed.
msg129554 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-02-26 14:26
Shouldn’t there be a regression test for this?
msg129563 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2011-02-26 15:46
There should, and I'm looking at some additional tests suggested for inclusion in #11332. I'll mark the issue as pending to remind me to ensure that the test gets added soon.
msg129566 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2011-02-26 16:06
Regression test added to py3k and release32-maint (r88654). I just had to modify an existing test case.
Date User Action Args
2011-02-26 16:06:49vinay.sajipsetstatus: pending -> closed
nosy: vinay.sajip, eric.araujo, akira
messages: + msg129566
2011-02-26 15:46:18vinay.sajipsetstatus: closed -> pending
nosy: vinay.sajip, eric.araujo, akira
messages: + msg129563
2011-02-26 14:26:50eric.araujosetnosy: + eric.araujo, - docs@python
messages: + msg129554
components: + Library (Lib), - Documentation
2011-02-26 14:18:28vinay.sajipsetstatus: open -> closed
nosy: vinay.sajip, docs@python, akira
messages: + msg129551

resolution: fixed
stage: resolved
2011-02-26 10:54:14pitrousetassignee: docs@python -> vinay.sajip

nosy: + vinay.sajip
2011-02-26 10:52:27akiracreate