This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Logging Logger.exception documentation
Type: Stage: resolved
Components: Documentation Versions: Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Cameron.Lee, docs@python, python-dev, vinay.sajip, yselivanov
Priority: normal Keywords:

Created on 2014-04-15 20:19 by Cameron.Lee, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (5)
msg216379 - (view) Author: Cameron Lee (Cameron.Lee) Date: 2014-04-15 20:19
The documentation doesn't indicate that the Logger.exception method can accept kwargs like the other logging methods (Logger.debug, Logger.info, etc...) such as exc_info, stack_info, and extra.

https://docs.python.org/2.7/library/logging.html#logging.Logger.exception

The method signature is documented as: 

Logger.exception(msg, *args)

It should be:

Logger.exception(msg, *args, **kwargs)

It appears that this functionality was added in between Python 2.7.3 and 2.7.4 (http://bugs.python.org/issue15541) but that the documentation was never changed for the newer versions.
msg216386 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2014-04-15 21:17
Removed Python versions which are not receiving changes.
msg216401 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-04-15 22:14
New changeset dcb5ca1f1b44 by Vinay Sajip in branch '2.7':
Issue #21245: updated documentation on exception() method and function.
http://hg.python.org/cpython/rev/dcb5ca1f1b44

New changeset eee4fd2012ae by Vinay Sajip in branch '3.4':
Issue #21245: updated documentation on exception() method and function.
http://hg.python.org/cpython/rev/eee4fd2012ae

New changeset a0ec713964b1 by Vinay Sajip in branch 'default':
Closes #21245: merged update from 3.4.
http://hg.python.org/cpython/rev/a0ec713964b1
msg216405 - (view) Author: Cameron Lee (Cameron.Lee) Date: 2014-04-15 22:22
Are you sure that Python 3.2 and Python 3.3 don't need updated documentation? I don't know for sure if these two version have the code change or not but the http://bugs.python.org/issue15541 seems to indicate that 3.2 at least does.

Thanks for the amazing response!
msg216408 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2014-04-15 22:36
> Are you sure that Python 3.2 and Python 3.3 don't need updated documentation?

As I understand it, the policy is not to do documentation updates for Python versions that will never see new releases. If a 3.x release manager says otherwise, I can revisit it - obviously the changes are easy to make :-)
History
Date User Action Args
2022-04-11 14:58:01adminsetgithub: 65444
2014-04-15 22:36:31vinay.sajipsetmessages: + msg216408
2014-04-15 22:22:22Cameron.Leesetmessages: + msg216405
2014-04-15 22:14:09python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg216401

resolution: fixed
stage: resolved
2014-04-15 21:17:15vinay.sajipsetmessages: + msg216386
versions: - Python 3.1, Python 3.2, Python 3.3
2014-04-15 20:20:36yselivanovsetnosy: + vinay.sajip, yselivanov
2014-04-15 20:19:59Cameron.Leecreate