classification
Title: openlog()s 'logopt' keyword broken in syslog module
Type: Stage: resolved
Components: Documentation Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, eric.smith, georg.brandl, jafo, pitrou, r.david.murray, sandro.tosi, tbielawa
Priority: normal Keywords: patch

Created on 2011-03-23 02:42 by tbielawa, last changed 2012-01-04 22:14 by sandro.tosi. This issue is now closed.

Files
File name Uploaded Description Edit
syslog-fixlogopt-keyword.patch tbielawa, 2011-03-23 02:42
syslogtest-pid.py tbielawa, 2011-03-23 02:48
Messages (6)
msg131844 - (view) Author: Tim Bielawa (tbielawa) Date: 2011-03-23 02:42
Issue 8451 unintentionally introduced a bug into the openlog() function in the syslog module.

syslog.openlog() as documented [1] is defined as: syslog.openlog([ident[, logopt[, facility]]]). I believe this is caused by the patch for issue 8451 redefining the kwargs to expect a 'logoption' keyword instead.


This patch:

 - Fixes syslog.openlog() so that it properly accepts the 'logopt' keyword argument again.



[1] http://docs.python.org/library/syslog.html#syslog.openlog
msg131845 - (view) Author: Tim Bielawa (tbielawa) Date: 2011-03-23 02:48
Trivial though it may be, the attached script demonstrates how to reproduce the bug described.
msg131846 - (view) Author: Tim Bielawa (tbielawa) Date: 2011-03-23 03:06
Classification update.
msg131860 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2011-03-23 09:33
Now that keyword support was introduced, I'd rather fix the documentation to use the new name.
msg131862 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2011-03-23 11:12
I agree with Georg, unfortunately.

And I say "unfortunately" because neither "logopt" nor "logoption" is a good name. The "log" part adds nothing. The man page for syslog calls this "option", which would be my preferred name. But changing it now would be a hassle.

Also, we clearly need a test for this, since apparently none failed when it was changed to the longer name.
msg150630 - (view) Author: Sandro Tosi (sandro.tosi) * (Python committer) Date: 2012-01-04 22:14
This has already been fixed with 71f7175e2b34 & friends.
History
Date User Action Args
2012-01-04 22:14:00sandro.tosisetstatus: open -> closed

versions: - Python 3.4
nosy: + sandro.tosi

messages: + msg150630
resolution: fixed
stage: resolved
2011-03-23 11:12:55eric.smithsetnosy: georg.brandl, jafo, pitrou, eric.smith, r.david.murray, docs@python, tbielawa
messages: + msg131862
2011-03-23 09:33:20georg.brandlsetnosy: + docs@python, georg.brandl
messages: + msg131860

assignee: docs@python
components: + Documentation, - Library (Lib)
2011-03-23 03:06:18tbielawasetnosy: jafo, pitrou, eric.smith, r.david.murray, tbielawa
messages: + msg131846
versions: + Python 3.2, Python 3.3, Python 3.4
2011-03-23 02:48:13tbielawasetfiles: + syslogtest-pid.py
nosy: jafo, pitrou, eric.smith, r.david.murray, tbielawa
messages: + msg131845
2011-03-23 02:45:36eric.araujosetnosy: + r.david.murray, jafo, pitrou, eric.smith
2011-03-23 02:42:36tbielawacreate